aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/devices/m25p80.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 1e147a849c35..c6e6d8e8ef7b 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1078,9 +1078,8 @@ static const struct spi_device_id *jedec_probe(struct spi_device *spi)
1078 for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) { 1078 for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
1079 info = (void *)m25p_ids[tmp].driver_data; 1079 info = (void *)m25p_ids[tmp].driver_data;
1080 if (info->jedec_id == jedec) { 1080 if (info->jedec_id == jedec) {
1081 if (info->ext_id != 0 && info->ext_id != ext_jedec) 1081 if (info->ext_id == 0 || info->ext_id == ext_jedec)
1082 continue; 1082 return &m25p_ids[tmp];
1083 return &m25p_ids[tmp];
1084 } 1083 }
1085 } 1084 }
1086 dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec); 1085 dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);