diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-19 05:52:46 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-12-15 09:13:16 +0100 |
commit | 682798a596a6f3ffe796ebbf6a9396bed6dc6de2 (patch) | |
tree | 1e804030929c9386791919527d484e2d8fec0649 /drivers/mmc | |
parent | mmc: sdhci-acpi: Handle return value of platform_get_irq (diff) | |
download | linux-682798a596a6f3ffe796ebbf6a9396bed6dc6de2.tar.xz linux-682798a596a6f3ffe796ebbf6a9396bed6dc6de2.zip |
mmc: sdhci-spear: Handle return value of platform_get_irq
platform_get_irq() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-spear.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 8c0f88428556..14511526a3a8 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -82,6 +82,10 @@ static int sdhci_probe(struct platform_device *pdev) host->hw_name = "sdhci"; host->ops = &sdhci_pltfm_ops; host->irq = platform_get_irq(pdev, 0); + if (host->irq <= 0) { + ret = -EINVAL; + goto err_host; + } host->quirks = SDHCI_QUIRK_BROKEN_ADMA; sdhci = sdhci_priv(host); |