[PATCH] mtd: spi-nor: remove a bogus check of header.minor
Shawn Lin
shawn.lin at rock-chips.com
Wed Jul 12 17:38:31 PDT 2017
header.minor is a unsigned data type and this check should
never happen. So remove this bogus check.
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---
drivers/mtd/spi-nor/spi-nor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 196b52f..fea8675 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2237,8 +2237,7 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
/* Check the SFDP header version. */
if (le32_to_cpu(header.signature) != SFDP_SIGNATURE ||
- header.major != SFDP_JESD216_MAJOR ||
- header.minor < SFDP_JESD216_MINOR)
+ header.major != SFDP_JESD216_MAJOR)
return -EINVAL;
/*
--
1.9.1
More information about the linux-mtd
mailing list