[PATCH 4/5] mtd: nand: omap: Bail out when omap_gpmc_eccmode() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The driver can't work when omap_gpmc_eccmode() fails, so do not ignore
the error.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux