[PATCH] mmc: omap_hsmmc: fix error return code in omap_hsmmc_probe()

Wei Yongjun weiyj.lk at gmail.com
Thu May 9 12:06:20 EST 2013


From: Wei Yongjun <yongjun_wei at 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 at trendmicro.com.cn>
---
 drivers/mmc/host/omap_hsmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;



More information about the devicetree-discuss mailing list