Skip to content

Commit

Permalink
mtd: mxc_nand: Propagate the error if platform_get_irq() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Brian Norris committed Mar 11, 2014
1 parent da22b89 commit 26fbf48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/nand/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 26fbf48

Please sign in to comment.