summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mxcmmc.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-07-07 00:59:28 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 14:01:24 +0200
commitf216c124dc769dfee14b445aec9e1c0b8852d7a2 (patch)
treed47b86fcb82aac4b97f81f2c007b774015734647 /drivers/mmc/host/mxcmmc.c
parent0f77934ab8db9368e29f1cb050af25c244710471 (diff)
downloadlinux-f216c124dc769dfee14b445aec9e1c0b8852d7a2.tar.bz2
mmc: mxcmmc: fix error return code in mxcmci_probe()
platform_get_irq() returns an error code, but the mxcmmc driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mxcmmc.c')
-rw-r--r--drivers/mmc/host/mxcmmc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index fb3ca8296273..f3c28326c4db 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -1014,8 +1014,10 @@ static int mxcmci_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
- if (irq < 0)
- return -EINVAL;
+ if (irq < 0) {
+ dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
+ return irq;
+ }
mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
if (!mmc)