[PATCH 4/5] mtd: nand: omap: Bail out when omap_gpmc_eccmode() fails
Sascha Hauer
s.hauer at pengutronix.de
Fri Dec 11 03:15:32 EST 2020
The driver can't work when omap_gpmc_eccmode() fails, so do not ignore
the error.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/nand/nand_omap_gpmc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index 8fdfd236bd..db1ca88791 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -1322,7 +1322,9 @@ static int gpmc_nand_probe(struct device_d *pdev)
omap_gpmc_eccmode_set, NULL, (int *)&oinfo->ecc_mode,
ecc_mode_strings, ARRAY_SIZE(ecc_mode_strings), oinfo);
- omap_gpmc_eccmode(oinfo, oinfo->ecc_mode);
+ err = omap_gpmc_eccmode(oinfo, oinfo->ecc_mode);
+ if (err)
+ goto out_release_mem;
/* We are all set to register with the system now! */
err = add_mtd_nand_device(minfo, "nand");
--
2.20.1
More information about the barebox
mailing list