Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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));