Re: [PATCH -next] mtd: sharpslpart: Fix unsigned comparison to zero

From: Miquel Raynal
Date: Tue Jan 14 2020 - 12:05:08 EST


On Mon, 2019-12-30 at 03:29:45 UTC, YueHaibing wrote:
> The unsigned variable log_num is being assigned a return value
> from the call to sharpsl_nand_get_logical_num that can return
> -EINVAL.
>
> Detected using Coccinelle:
> ./drivers/mtd/parsers/sharpslpart.c:207:6-13: WARNING: Unsigned expression compared with zero: log_num > 0
>
> Fixes: 8a4580e4d298 ("mtd: sharpslpart: Add sharpslpart partition parser")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

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

Miquel