mmc: sdhci-s3c: Handle error from mmc_of_parse()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 18 Dec 2014 09:41:42 +0000 (10:41 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 Jan 2015 08:56:13 +0000 (09:56 +0100)
Since mmc_of_parse() may fail, let's deal with it and thus do proper
error handling.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/host/sdhci-s3c.c

index c45b8932d8438086f36661b59aac2b74a2dc56f1..a2828222709cf3fe60a822ffc01756f0f034dae2 100644 (file)
@@ -607,7 +607,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
        pm_runtime_use_autosuspend(&pdev->dev);
        pm_suspend_ignore_children(&pdev->dev, 1);
 
-       mmc_of_parse(host->mmc);
+       ret = mmc_of_parse(host->mmc);
+       if (ret)
+               goto err_req_regs;
 
        ret = sdhci_add_host(host);
        if (ret) {