linux/drivers/mtd/parsers
YueHaibing 771fd0b2e8 mtd: sharpslpart: Fix unsigned comparison to zero
commit f33113b542 upstream.

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: 8a4580e4d2 ("mtd: sharpslpart: Add sharpslpart partition parser")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-14 16:34:18 -05:00
..
Kconfig
Makefile
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c
ofpart.c
parser_imagetag.c
parser_trx.c
redboot.c
sharpslpart.c mtd: sharpslpart: Fix unsigned comparison to zero 2020-02-14 16:34:18 -05:00