mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 09:09:55 -04:00
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 <fabio.estevam@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
committed by
Brian Norris
parent
da22b89386
commit
26fbf48b7a
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user