]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 23 Dec 2018 20:59:18 +0000 (21:59 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Feb 2019 07:40:58 +0000 (08:40 +0100)
We need to handle mmc_of_parse() errors during probe otherwise the
MMC driver could start without proper initialization (e.g. power sequence).

Fixes: 476bf3d62d5c ("mmc: sdhci-brcmstb: Add driver for Broadcom BRCMSTB SoCs")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-brcmstb.c

index 552bddc5096ce2e2d2638483f3baf7317115d5bf..1cd10356fc14fd1ddbe9d20306b913b684de0add 100644 (file)
@@ -55,7 +55,9 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
        }
 
        sdhci_get_of_property(pdev);
-       mmc_of_parse(host->mmc);
+       res = mmc_of_parse(host->mmc);
+       if (res)
+               goto err;
 
        /*
         * Supply the existing CAPS, but clear the UHS modes. This