mmc: sdhci-pxav3: handle mmc_of_parse() errors during probe
authorSimon Baatz <gmbnomis@gmail.com>
Sun, 9 Jun 2013 20:14:15 +0000 (22:14 +0200)
committerChris Ball <cjb@laptop.org>
Thu, 27 Jun 2013 14:23:11 +0000 (10:23 -0400)
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pxav3.c

index 56d9bee93d8ff4310abf19458159fa99cbd6f5f7..d29f810973346b5abd48c6b28a5b80da0491426d 100644 (file)
@@ -252,7 +252,9 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 
        match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev);
        if (match) {
-               mmc_of_parse(host->mmc);
+               ret = mmc_of_parse(host->mmc);
+               if (ret)
+                       goto err_of_parse;
                sdhci_get_of_property(pdev);
                pdata = pxav3_get_mmc_pdata(dev);
        } else if (pdata) {
@@ -313,10 +315,11 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 
        return 0;
 
+err_of_parse:
+err_cd_req:
 err_add_host:
        clk_disable_unprepare(clk);
        clk_put(clk);
-err_cd_req:
 err_clk_get:
        sdhci_pltfm_free(pdev);
        kfree(pxa);