mtd: spi-nor: remove a bogus check of header.minor

Message ID 1499906311-75170-1-git-send-email-shawn.lin@rock-chips.com
State New
Delegated to: Cyrille Pitchen
Headers show

Commit Message

Shawn Lin July 13, 2017, 12:38 a.m.
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@rock-chips.com>
---

 drivers/mtd/spi-nor/spi-nor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

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;
 
 	/*