]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
authorAdam Ford <aford173@gmail.com>
Sun, 30 Dec 2018 16:11:16 +0000 (10:11 -0600)
committerStefano Babic <sbabic@denx.de>
Mon, 28 Jan 2019 19:55:46 +0000 (20:55 +0100)
The initialization function calls a nand_chip.scan_bbt(mtd) but
scan_bbt is never initialized resulting in an undefined function
pointer.  This will direct the function pointer to nand_default_bbt
defined in the same file.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
drivers/mtd/nand/raw/mxs_nand_spl.c

index 2d7bbe83cce5419ad7030736a4ebd19708d5523f..c628f3adec0fbe7cd620d74685fe361ddd253317 100644 (file)
@@ -185,6 +185,7 @@ static int mxs_nand_init(void)
        mtd = nand_to_mtd(&nand_chip);
        /* set mtd functions */
        nand_chip.cmdfunc = mxs_nand_command;
+       nand_chip.scan_bbt = nand_default_bbt;
        nand_chip.numchips = 1;
 
        /* identify flash device */