projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mtd/m25p80: fix test for end of loop
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
mtd
/
devices
/
m25p80.c
diff --git
a/drivers/mtd/devices/m25p80.c
b/drivers/mtd/devices/m25p80.c
index 83c90867240f401a8975ae5aee50ecdc688fed0c..6f512b5c117b54ef0dddbe647cdfd53a52100541 100644
(file)
--- 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)
break;
}
- if (
plat_id
)
+ if (
i < ARRAY_SIZE(m25p_ids) - 1
)
id = plat_id;
else
dev_warn(&spi->dev, "unrecognized id %s\n", data->type);