[PATCH v3] mtd: rawnand: Fix return value check of wait_for_completion_timeout
Miquel Raynal
miquel.raynal at bootlin.com
Thu Apr 21 00:35:37 PDT 2022
On Tue, 2022-04-12 at 08:34:31 UTC, Miaoqian Lin wrote:
> wait_for_completion_timeout() returns unsigned long not int.
> It returns 0 if timed out, and positive if completed.
> The check for <= 0 is ambiguous and should be == 0 here
> indicating timeout which is the only error case.
>
> Fixes: 83738d87e3a0 ("mtd: sh_flctl: Add DMA capabilty")
> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.
Miquel
More information about the linux-mtd
mailing list