diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-11-01 08:16:18 +0800 |
|---|---|---|
| committer | Evan Wilson <evan@oliodevices.com> | 2014-11-29 14:50:11 -0800 |
| commit | f2ab4d9f88855fbba53dde4dcaac222db44196a7 (patch) | |
| tree | 63050445fb06a0a5204967695afa8543965eaf0f /drivers/mtd/nand/omap2.c | |
| parent | f85370f07c5ae0f5693c52e402038d5dadf47378 (diff) | |
| download | olio-linux-3.10-f2ab4d9f88855fbba53dde4dcaac222db44196a7.tar.xz olio-linux-3.10-f2ab4d9f88855fbba53dde4dcaac222db44196a7.zip | |
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@trendmicro.com.cn>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/omap2.c')
| -rw-r--r-- | drivers/mtd/nand/omap2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ec40b8d1020..f7772500990 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; } |