diff mbox

mmc: omap_hsmmc: fix error return code in omap_hsmmc_probe()

Message ID CAPgLHd-Trv1W4+NC2m8=quDpyZ74kHZiY35ZV7f7_PnRZAP+4g@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun May 9, 2013, 2:06 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code in the init 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/omap_hsmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 6e44025..32d3659 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1948,7 +1948,8 @@  static int omap_hsmmc_probe(struct platform_device *pdev)
 	}
 
 	if (pdata->init != NULL) {
-		if (pdata->init(&pdev->dev) != 0) {
+		ret = pdata->init(&pdev->dev);
+		if (ret != 0) {
 			dev_err(mmc_dev(host->mmc),
 				"Unable to configure MMC IRQs\n");
 			goto err_irq_cd_init;