[PATCH -next v3 RESEND] mtd: rawnand: Propagate error and simplify ternary operators for brcmstb_nand_wait_for_completion()

Miquel Raynal miquel.raynal at bootlin.com
Fri Aug 18 07:41:12 PDT 2023


On Tue, 2023-08-08 at 03:29:43 UTC, Ruan Jinjie wrote:
> As bcmnand_ctrl_poll_status() return negative errno, so return true if
> sts < 0. The < 0 case does not exist for wait_for_completion_timeout(),
> so return true if sts = 0 and zero otherwise. Both of the true return
> of them can be considered as a -ETIMEDOUT err, so return -ETIMEDOUT
> if err is true to propagate err from its caller.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com>
> Reviewed-by: William Zhang <william.zhang at broadcom.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel



More information about the linux-mtd mailing list