diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-12-11 08:51:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-12-11 09:20:46 +0100 |
commit | 43317598a17493ec9e80e7a501c7e0933bca25e4 (patch) | |
tree | f0c10b91f1f2f434b471b105a06796c95146a466 | |
parent | 2666b4812ee58baeb47efd554582407471744f32 (diff) | |
download | barebox-43317598a17493ec9e80e7a501c7e0933bca25e4.tar.gz barebox-43317598a17493ec9e80e7a501c7e0933bca25e4.tar.xz |
mtd: nand: omap: Bail out when omap_gpmc_eccmode() fails
The driver can't work when omap_gpmc_eccmode() fails, so do not ignore
the error.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/nand/nand_omap_gpmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index d75b0808f8..d75f57b419 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -1315,7 +1315,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"); |