linux-stable/drivers/mtd/parsers
YueHaibing a23409cee4 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:33:27 -05:00
..
Kconfig mtd: sharpslpart: Add sharpslpart partition parser 2017-11-13 21:39:19 +01:00
Makefile mtd: sharpslpart: Add sharpslpart partition parser 2017-11-13 21:39:19 +01:00
parser_trx.c mtd: parsers: trx: add of_match_table with the new DT binding 2018-07-07 10:51:00 +02:00
sharpslpart.c mtd: sharpslpart: Fix unsigned comparison to zero 2020-02-14 16:33:27 -05:00