diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-02-09 16:22:33 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-03-30 21:27:47 -0400 |
commit | 899b834a462921a087f92f705d9f85def5892242 (patch) | |
tree | 3ea2cf7ee6a8619b44769123bfcb222ca1221db5 | |
parent | 706d5b289924678de9d8af67bcb00e28c1a5000c (diff) |
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>
-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 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) | |||
1950 | ret = nand_boot_init(this); | 1950 | ret = nand_boot_init(this); |
1951 | if (ret) | 1951 | if (ret) |
1952 | goto err_out; | 1952 | goto err_out; |
1953 | chip->scan_bbt(mtd); | 1953 | ret = chip->scan_bbt(mtd); |
1954 | if (ret) | ||
1955 | goto err_out; | ||
1954 | 1956 | ||
1955 | ppdata.of_node = this->pdev->dev.of_node; | 1957 | ppdata.of_node = this->pdev->dev.of_node; |
1956 | ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); | 1958 | ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); |