diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-06 14:56:09 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-09-26 21:31:25 +0200 |
commit | 902a8a0b50d7d13cf88211d0bde3a7c27fd98fa5 (patch) | |
tree | 2da4826b9b601c64fd1c48c8dfee3f5bc3abefbe /drivers/mmc | |
parent | 7428e0bf7e87627af880b013f5f4648f07f70842 (diff) | |
download | linux-902a8a0b50d7d13cf88211d0bde3a7c27fd98fa5.tar.gz linux-902a8a0b50d7d13cf88211d0bde3a7c27fd98fa5.tar.bz2 linux-902a8a0b50d7d13cf88211d0bde3a7c27fd98fa5.zip |
mmc: davinci: remove incorrect NO_IRQ use
platform_get_irq() returns an error value on failure, not NO_IRQ,
so the error handling here could never work.
This changes the code to propagate the error value instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/davinci_mmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index a56373c75983..8fa478c3b0db 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1216,9 +1216,11 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) } r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - irq = platform_get_irq(pdev, 0); - if (!r || irq == NO_IRQ) + if (!r) return -ENODEV; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; mem_size = resource_size(r); mem = devm_request_mem_region(&pdev->dev, r->start, mem_size, |