From: Fabio Estevam Date: Mon, 9 Feb 2015 21:22:33 +0000 (-0200) Subject: mtd: nand: gpmi: Check for scan_bbt() error X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=899b834a462921a087f92f705d9f85def5892242;p=linux-beck.git mtd: nand: gpmi: Check for scan_bbt() error In case of scan_bbt() failure, we should better propagate it. Signed-off-by: Fabio Estevam Acked-by: Huang Shijie Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 6e44d3268fcb..1b8f3500e6d2 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -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);