diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-28 01:26:25 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 10:56:03 -0400 |
commit | 5a0e8074660444010fee40eebcd57aaaf8d44662 (patch) | |
tree | 378e8e785f6032094b3b93762b9c406fd0f683c5 /drivers/mmc/host/sdhci-acpi.c | |
parent | 3f7eec62ecb7e30bd2f7e0fc4432d0d08a1aae46 (diff) |
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 <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>
Diffstat (limited to 'drivers/mmc/host/sdhci-acpi.c')
-rw-r--r-- | drivers/mmc/host/sdhci-acpi.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
189 | goto out; | 189 | goto out; |
190 | 190 | ||
191 | irq = gpio_to_irq(gpio); | 191 | irq = gpio_to_irq(gpio); |
192 | if (irq < 0) | 192 | if (irq < 0) { |
193 | err = irq; | ||
193 | goto out_free; | 194 | goto out_free; |
195 | } | ||
194 | 196 | ||
195 | flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; | 197 | flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; |
196 | err = devm_request_irq(dev, irq, sdhci_acpi_sd_cd, flags, "sd_cd", mmc); | 198 | err = devm_request_irq(dev, irq, sdhci_acpi_sd_cd, flags, "sd_cd", mmc); |