diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 83c90867240f..6f512b5c117b 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -793,7 +793,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
793 | break; | 793 | break; |
794 | } | 794 | } |
795 | 795 | ||
796 | if (plat_id) | 796 | if (i < ARRAY_SIZE(m25p_ids) - 1) |
797 | id = plat_id; | 797 | id = plat_id; |
798 | else | 798 | else |
799 | dev_warn(&spi->dev, "unrecognized id %s\n", data->type); | 799 | dev_warn(&spi->dev, "unrecognized id %s\n", data->type); |