forked from Minki/linux
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>
This commit is contained in:
parent
928635c114
commit
1b7ba57ecc
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user