From acfa77b1a95c6179b29445d7142d94722948d8e1 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 18 Dec 2014 10:41:40 +0100 Subject: [PATCH] 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 --- drivers/mmc/host/sdhci-bcm-kona.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 2.39.5