From: Fabio Estevam Date: Fri, 14 Feb 2014 03:09:34 +0000 (-0200) Subject: mtd: mxc_nand: Propagate the error if platform_get_irq() fails X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=26fbf48b7a04d585d89709d9e6f1e66b8bfc5dc2;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git mtd: mxc_nand: Propagate the error if platform_get_irq() fails Check the return value from platform_get_irq() and propagate it in the case of error. Signed-off-by: Fabio Estevam Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index e9a4835c4dd9..dba262bf766f 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -1501,6 +1501,8 @@ static int mxcnd_probe(struct platform_device *pdev) init_completion(&host->op_completion); host->irq = platform_get_irq(pdev, 0); + if (host->irq < 0) + return host->irq; /* * Use host->devtype_data->irq_control() here instead of irq_control()