linux-stable/drivers/mtd
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
..
chips mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() 2019-10-01 08:26:02 +02:00
devices mtd: devices: fix mchp23k256 read and write 2020-01-23 08:21:37 +01:00
lpddr
maps mtd: physmap_of: Release resources on error 2019-11-24 08:20:17 +01:00
nand mtd: onenand_base: Adjust indentation in onenand_read_ops_nolock 2020-02-14 16:33:26 -05:00
parsers mtd: sharpslpart: Fix unsigned comparison to zero 2020-02-14 16:33:27 -05:00
spi-nor mtd: spi-nor: fix silent truncation in spi_nor_read_raw() 2020-01-17 19:47:12 +01:00
tests
ubi ubi: Fix an error pointer dereference in error handling code 2020-02-11 04:34:14 -08:00
Kconfig
Makefile
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h mtd: Check add_mtd_device() ret code 2019-12-05 09:21:05 +01:00
mtdoops.c
mtdpart.c mtd: Remove a debug trace in mtdpart.c 2019-12-05 09:21:24 +01:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c