diff options
author | Arvind Yadav <[email protected]> | 2017-11-19 10:22:46 +0530 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2017-12-15 09:13:16 +0100 |
commit | 682798a596a6f3ffe796ebbf6a9396bed6dc6de2 (patch) | |
tree | 1e804030929c9386791919527d484e2d8fec0649 | |
parent | 1b7ba57ecc864173ef42fff7f8c2e9a880b42bd2 (diff) |
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 <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
-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); |