]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sf: Add an empty entry to the parameter list
authorSimon Glass <sjg@chromium.org>
Mon, 15 Sep 2014 12:33:36 +0000 (06:33 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 23 Sep 2014 18:44:30 +0000 (12:44 -0600)
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>
drivers/mtd/spi/sf_params.c

index ac886fd071c0190e0b470c7d6d6863b8ed187ff9..856eb4cfbed97b2952eec76f22feb893962687d6 100644 (file)
@@ -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.