linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe()
@ 2013-11-01  0:16 Wei Yongjun
  2013-11-01  2:18 ` Jingoo Han
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Yongjun @ 2013-11-01  0:16 UTC (permalink / raw)
  To: dwmw2, jg1.han, zonque, avinashphilip, computersforpeace,
	artem.bityutskiy, pekon, tony
  Cc: yongjun_wei, linux-mtd, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 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;
 		}

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-07  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01  0:16 [PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe() Wei Yongjun
2013-11-01  2:18 ` Jingoo Han
2013-11-05 21:59   ` Brian Norris
2013-11-05 22:45     ` Ezequiel Garcia
2013-11-07  7:18       ` Brian Norris
2013-11-06 18:06     ` Gupta, Pekon
2013-11-07  7:19       ` Brian Norris
2013-11-07  8:19         ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).