Skip to content

Commit 90d4fa4

Browse files
richardweinbergerCyrillePitchen
authored andcommitted
mtd: spi-nor: Kill check with no effect
header.minor is of type u8 and cannot be negative. Detected by CoverityScan CID#1417858 ("Integer handling issues") Fixes: f384b35 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
1 parent 8a5776a commit 90d4fa4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/mtd/spi-nor/spi-nor.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,8 +2288,7 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
22882288

22892289
/* Check the SFDP header version. */
22902290
if (le32_to_cpu(header.signature) != SFDP_SIGNATURE ||
2291-
header.major != SFDP_JESD216_MAJOR ||
2292-
header.minor < SFDP_JESD216_MINOR)
2291+
header.major != SFDP_JESD216_MAJOR)
22932292
return -EINVAL;
22942293

22952294
/*

0 commit comments

Comments
 (0)