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

Cc: Christian Daudt <bcm@fixthebug.org>
Cc: Matt Porter <mporter@linaro.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
drivers/mmc/host/sdhci-bcm-kona.c

index e7e4fbdcbfe021e248e91b25fce4eb0a3cf2a1ed..34bb8f92586e25980ea5467c366e1700884328a5 100644 (file)
@@ -254,7 +254,9 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev)
        kona_dev = sdhci_pltfm_priv(pltfm_priv);
        mutex_init(&kona_dev->write_lock);
 
-       mmc_of_parse(host->mmc);
+       ret = mmc_of_parse(host->mmc);
+       if (ret)
+               goto err_pltfm_free;
 
        if (!host->mmc->f_max) {
                dev_err(&pdev->dev, "Missing max-freq for SDHCI cfg\n");