summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-28 07:26:50 +0200
committerChris Ball <cjb@laptop.org>2013-06-27 16:57:29 +0200
commit7913ae7d10d82bf9d9af6be6c20281fceb695ec0 (patch)
treede770895c83a86634a4c162b32a5bd6ddd7b9132 /drivers/mmc
parentmmc: sdhci-acpi: fix error return code in sdhci_acpi_add_own_cd() (diff)
downloadlinux-7913ae7d10d82bf9d9af6be6c20281fceb695ec0.tar.xz
linux-7913ae7d10d82bf9d9af6be6c20281fceb695ec0.zip
mmc: sh_mobile_sdhi: fix error return code in sh_mobile_sdhi_probe()
Fix to return a negative error code instead of 0 when we cannot get IRQ source by platform_get_irq(), as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index cc4c872cc924..a4316b34df1f 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -273,8 +273,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
}
/* There must be at least one IRQ source */
- if (!i)
+ if (!i) {
+ ret = irq;
goto eirq;
+ }
}
dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",