diff options
| author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-02-13 22:09:34 -0500 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2014-03-11 01:42:26 -0400 |
| commit | 26fbf48b7a04d585d89709d9e6f1e66b8bfc5dc2 (patch) | |
| tree | dfaa11e31cbaa11bf3aa56690acdd7d35e70bf66 | |
| parent | da22b89386e8d4dc89525801dfe60f5f8c29668d (diff) | |
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>
| -rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
| 1501 | init_completion(&host->op_completion); | 1501 | init_completion(&host->op_completion); |
| 1502 | 1502 | ||
| 1503 | host->irq = platform_get_irq(pdev, 0); | 1503 | host->irq = platform_get_irq(pdev, 0); |
| 1504 | if (host->irq < 0) | ||
| 1505 | return host->irq; | ||
| 1504 | 1506 | ||
| 1505 | /* | 1507 | /* |
| 1506 | * Use host->devtype_data->irq_control() here instead of irq_control() | 1508 | * Use host->devtype_data->irq_control() here instead of irq_control() |
