diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-19 10:22:43 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-12-15 09:13:16 +0100 |
commit | cbcaac6d7dd209f2077480f4297e131c8b90d223 (patch) | |
tree | b919671007294ac8f2dfaa44066c4732e5f43c08 /drivers/mmc/host/meson-gx-mmc.c | |
parent | 6b79e77c92a3ab2417cd97dcd5ac981af967e6ad (diff) | |
download | lwn-cbcaac6d7dd209f2077480f4297e131c8b90d223.tar.gz lwn-cbcaac6d7dd209f2077480f4297e131c8b90d223.zip |
mmc: meson-gx-mmc: Fix platform_get_irq's error checking
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/meson-gx-mmc.c')
-rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index e0862d3f65b3..32a6a228cd12 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1208,7 +1208,7 @@ static int meson_mmc_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq <= 0) { dev_err(&pdev->dev, "failed to get interrupt resource.\n"); ret = -EINVAL; goto free_host; |