Skip to content
Commit f33113b5 authored by YueHaibing's avatar YueHaibing Committed by Miquel Raynal
Browse files

mtd: sharpslpart: Fix unsigned comparison to zero



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: 8a4580e4 ("mtd: sharpslpart: Add sharpslpart partition parser")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 05a5a6e5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment