diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-31 20:16:18 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-11-07 02:33:15 -0500 |
commit | 9211439b8a933a624d770113d0e0aa742db2ec67 (patch) | |
tree | fb33efe7cf4a38cbb02acd348f021a0e8fb3f5c5 /drivers/mtd/nand | |
parent | 5961ad2cb4dd14933889f5219e0d8505669d752d (diff) |
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')
-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 ec40b8d10201..f77725009907 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) | |||
1953 | nand_chip->ecc.read_page = omap_read_page_bch; | 1953 | nand_chip->ecc.read_page = omap_read_page_bch; |
1954 | nand_chip->ecc.write_page = omap_write_page_bch; | 1954 | nand_chip->ecc.write_page = omap_write_page_bch; |
1955 | /* This ECC scheme requires ELM H/W block */ | 1955 | /* This ECC scheme requires ELM H/W block */ |
1956 | if (is_elm_present(info, pdata->elm_of_node, BCH8_ECC) < 0) { | 1956 | err = is_elm_present(info, pdata->elm_of_node, BCH8_ECC); |
1957 | if (err < 0) { | ||
1957 | pr_err("nand: error: could not initialize ELM\n"); | 1958 | pr_err("nand: error: could not initialize ELM\n"); |
1958 | goto return_error; | 1959 | goto return_error; |
1959 | } | 1960 | } |