From: Ulf Hansson Date: Thu, 18 Dec 2014 09:41:40 +0000 (+0100) Subject: mmc: sdhci-bcm-kona: Handle error from mmc_of_parse() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=acfa77b1a95c6179b29445d7142d94722948d8e1;p=linux-beck.git mmc: sdhci-bcm-kona: Handle error from mmc_of_parse() Since mmc_of_parse() may fail, let's deal with it and thus do proper error handling. Cc: Christian Daudt Cc: Matt Porter Cc: Florian Fainelli Signed-off-by: Ulf Hansson Acked-by: Florian Fainelli --- diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index e7e4fbdcbfe0..34bb8f92586e 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -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");