From: Wei Yongjun <[email protected]>

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 <[email protected]>
---
 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;

_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to