diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-19 10:22:45 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-12-15 09:13:16 +0100 |
commit | 1b7ba57ecc864173ef42fff7f8c2e9a880b42bd2 (patch) | |
tree | b192f3badbe466da6e15bf592e43b1aff8a1b3b1 /drivers/mmc | |
parent | 928635c114adefc58aeb1a9f9615cd9d3c24e3e4 (diff) |
mmc: sdhci-acpi: 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: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-acpi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 264f10327bf9..4065da58789d 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -680,6 +680,10 @@ static int sdhci_acpi_probe(struct platform_device *pdev) host->hw_name = "ACPI"; host->ops = &sdhci_acpi_ops_dflt; host->irq = platform_get_irq(pdev, 0); + if (host->irq <= 0) { + err = -EINVAL; + goto err_free; + } host->ioaddr = devm_ioremap_nocache(dev, iomem->start, resource_size(iomem)); |