summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-02-09 19:22:33 -0200
committerBrian Norris <computersforpeace@gmail.com>2015-03-30 18:27:47 -0700
commit899b834a462921a087f92f705d9f85def5892242 (patch)
tree3ea2cf7ee6a8619b44769123bfcb222ca1221db5 /drivers/mtd
parent706d5b289924678de9d8af67bcb00e28c1a5000c (diff)
downloadtalos-obmc-linux-899b834a462921a087f92f705d9f85def5892242.tar.gz
talos-obmc-linux-899b834a462921a087f92f705d9f85def5892242.zip
mtd: nand: gpmi: Check for scan_bbt() error
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c4
1 files changed, 3 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud