mtd: atmel_nand: fix error return code in atmel_nand_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 23 Aug 2013 02:50:36 +0000 (10:50 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:52:44 +0000 (21:52 +0100)
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>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/atmel_nand.c

index 8b2eb3e..060feea 100644 (file)
@@ -2048,6 +2048,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
                irq = platform_get_irq(pdev, 0);
                if (irq < 0) {
                        dev_err(host->dev, "Cannot get HSMC irq!\n");
+                       res = irq;
                        goto err_nand_ioremap;
                }