Commit 1b7ba57e authored by Arvind Yadav's avatar Arvind Yadav Committed by Ulf Hansson

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 928635c1
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment