mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
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: f384b352cb
("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>
This commit is contained in:
parent
8a5776a5f4
commit
90d4fa4540
1 changed files with 1 additions and 2 deletions
|
@ -2288,8 +2288,7 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
|
||||||
|
|
||||||
/* Check the SFDP header version. */
|
/* Check the SFDP header version. */
|
||||||
if (le32_to_cpu(header.signature) != SFDP_SIGNATURE ||
|
if (le32_to_cpu(header.signature) != SFDP_SIGNATURE ||
|
||||||
header.major != SFDP_JESD216_MAJOR ||
|
header.major != SFDP_JESD216_MAJOR)
|
||||||
header.minor < SFDP_JESD216_MINOR)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue