mtd: nand: omap: fix error return code in omap_nand_probe()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Nov 13 13:59:06 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9211439b8a933a624d770113d0e0aa742db2ec67
Commit: 9211439b8a933a624d770113d0e0aa742db2ec67
Parent: 5961ad2cb4dd14933889f5219e0d8505669d752d
Author: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
AuthorDate: Fri Nov 1 08:16:18 2013 +0800
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 6 23:33:15 2013 -0800
mtd: nand: omap: fix error return code in omap_nand_probe()
Fix to return a negative error code from the error handling case instead
of 0, to more closely match the rest of this function.
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Acked-by: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
Acked-by: Pekon Gupta <pekon at ti.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/omap2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index ec40b8d..f777250 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1953,7 +1953,8 @@ static int omap_nand_probe(struct platform_device *pdev)
nand_chip->ecc.read_page = omap_read_page_bch;
nand_chip->ecc.write_page = omap_write_page_bch;
/* This ECC scheme requires ELM H/W block */
- if (is_elm_present(info, pdata->elm_of_node, BCH8_ECC) < 0) {
+ err = is_elm_present(info, pdata->elm_of_node, BCH8_ECC);
+ if (err < 0) {
pr_err("nand: error: could not initialize ELM\n");
goto return_error;
}
More information about the linux-mtd-cvs
mailing list