]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: nand: gpmi: Check for scan_bbt() error
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 9 Feb 2015 21:22:33 +0000 (19:22 -0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 31 Mar 2015 01:27:47 +0000 (18:27 -0700)
In case of scan_bbt() failure, we should better propagate it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Huang Shijie <shijie.huang@intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c

index 6e44d3268fcbe2ed6cef35ef2a66d81bd1300c81..1b8f3500e6d22613b7046e71af5ddb5c64717f65 100644 (file)
@@ -1950,7 +1950,9 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
        ret = nand_boot_init(this);
        if (ret)
                goto err_out;
-       chip->scan_bbt(mtd);
+       ret = chip->scan_bbt(mtd);
+       if (ret)
+               goto err_out;
 
        ppdata.of_node = this->pdev->dev.of_node;
        ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);