]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 28 May 2013 05:26:25 +0000 (13:26 +0800)
committerChris Ball <cjb@laptop.org>
Thu, 27 Jun 2013 14:56:03 +0000 (10:56 -0400)
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 <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-acpi.c

index a51e603acbc5e00d9317d6422388ccf88d4d3dd1..08a85ec332246eb8eac2b74a59e0ff354f224dfa 100644 (file)
@@ -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);