diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-12-30 11:29:45 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-14 16:34:18 -0500 |
commit | 771fd0b2e8bf7332f18c471230cf4a3db023831c (patch) | |
tree | c360604884a384b640de29e6469c2343e7f0c0e6 /crypto | |
parent | 1765aaef17530464ce5e02659249c8b6ea5e9f68 (diff) | |
download | linux-stable-771fd0b2e8bf7332f18c471230cf4a3db023831c.tar.gz linux-stable-771fd0b2e8bf7332f18c471230cf4a3db023831c.tar.bz2 linux-stable-771fd0b2e8bf7332f18c471230cf4a3db023831c.zip |
mtd: sharpslpart: Fix unsigned comparison to zero
commit f33113b542219448fa02d77ca1c6f4265bd7f130 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: 8a4580e4d298 ("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>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions