diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-02-09 19:22:33 -0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-03-30 18:27:47 -0700 |
commit | 899b834a462921a087f92f705d9f85def5892242 (patch) | |
tree | 3ea2cf7ee6a8619b44769123bfcb222ca1221db5 /drivers/mtd/nand | |
parent | 706d5b289924678de9d8af67bcb00e28c1a5000c (diff) | |
download | op-kernel-dev-899b834a462921a087f92f705d9f85def5892242.zip op-kernel-dev-899b834a462921a087f92f705d9f85def5892242.tar.gz |
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/nand')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 4 |
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 6e44d32..1b8f350 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); |