summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/sf_params.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-15 06:33:36 -0600
committerSimon Glass <sjg@chromium.org>2014-09-23 12:44:30 -0600
commitbf1a86fca0111067021f3d263242767d3709d7be (patch)
tree91f89c4b2db22fd81e39d4a6a358344374b1587c /drivers/mtd/spi/sf_params.c
parente7b14e9ab0ceef3068722007e7396f89f4ede9c2 (diff)
sf: Add an empty entry to the parameter list
The list is supposed to be terminated with a NULL name, but is not. If a board probes a chip which does not appear in the table, U-Boot will crash (at least on sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi/sf_params.c')
-rw-r--r--drivers/mtd/spi/sf_params.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c
index ac886fd071..856eb4cfbe 100644
--- a/drivers/mtd/spi/sf_params.c
+++ b/drivers/mtd/spi/sf_params.c
@@ -116,6 +116,7 @@ const struct spi_flash_params spi_flash_params_table[] = {
{"W25Q64DW", 0xef6017, 0x0, 64 * 1024, 128, RD_FULL, WR_QPP | SECT_4K},
{"W25Q128FW", 0xef6018, 0x0, 64 * 1024, 256, RD_FULL, WR_QPP | SECT_4K},
#endif
+ {}, /* Empty entry to terminate the list */
/*
* Note:
* Below paired flash devices has similar spi_flash params.