Skip to contentSkip to conversation

mtd: mxc_nand: Propagate the error if platform_get_irq() fails

PATCH Applied Fabio Estevam 2 participants 2 messages Feb 14, 2014 – Feb 23, 2014

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 mtd: mxc_nand: Propagate the error if platform_get_irq() fails

From: Fabio Estevam <[email protected]>

Check the return value from platform_get_irq() and propagate it in the case of error.

---
 drivers/mtd/nand/mxc_nand.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/mxc_nand.c +2 -0
index e9a4835..dba262b 100644
@@ -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()
Signature · 1 line
1.8.1.2