Skip to contentSkip to conversation

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

PATCH Applied Fabio Estevam 3 participants 3 messages Feb 9, 2015 – Mar 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: gpmi: Check for scan_bbt() error

From: Fabio Estevam <[email protected]>

In case of scan_bbt() failure, we should better propagate it.

---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +3 -1
index 33f3c3c..8ce8bb2 100644
@@ -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);
Signature · 1 line
1.9.1