Skip to content

Commit

Permalink
mtd: nand: gpmi: Check for scan_bbt() error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Brian Norris committed Mar 31, 2015
1 parent 706d5b2 commit 899b834
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mtd/nand/gpmi-nand/gpmi-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 899b834

Please sign in to comment.