From: Wei Yongjun Date: Tue, 28 May 2013 05:26:25 +0000 (+0800) Subject: mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a0e8074660444010fee40eebcd57aaaf8d44662;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd() Fix to return a negative error code in the gpio_to_irq() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Jingoo Han Acked-by: Adrian Hunter Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index a51e603acbc5..08a85ec33224 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -189,8 +189,10 @@ static int sdhci_acpi_add_own_cd(struct device *dev, int gpio, goto out; irq = gpio_to_irq(gpio); - if (irq < 0) + if (irq < 0) { + err = irq; goto out_free; + } flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; err = devm_request_irq(dev, irq, sdhci_acpi_sd_cd, flags, "sd_cd", mmc);