mtd: nand: gpmi: Check for scan_bbt() error

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Apr 22 10:59:06 PDT 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=899b834a462921a087f92f705d9f85def5892242
Commit:     899b834a462921a087f92f705d9f85def5892242
Parent:     706d5b289924678de9d8af67bcb00e28c1a5000c
Author:     Fabio Estevam <fabio.estevam at freescale.com>
AuthorDate: Mon Feb 9 19:22:33 2015 -0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Mar 30 18:27:47 2015 -0700

    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 at freescale.com>
    Acked-by: Huang Shijie <shijie.huang at intel.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);



More information about the linux-mtd-cvs mailing list