linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd()
@ 2013-05-28  5:26 Wei Yongjun
  2013-05-28  5:35 ` Jingoo Han
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2013-05-28  5:26 UTC (permalink / raw)
  To: cjb, adrian.hunter, rafael.j.wysocki, jg1.han, sonic.zhang
  Cc: yongjun_wei, linux-mmc

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/mmc/host/sdhci-acpi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index a51e603..08a85ec 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);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-27 14:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28  5:26 [PATCH] mmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd() Wei Yongjun
2013-05-28  5:35 ` Jingoo Han
2013-05-28  6:27   ` Adrian Hunter
2013-06-10  6:35     ` Adrian Hunter
2013-06-27 14:56     ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).