From: Eric Anholt Date: Fri, 29 May 2015 21:06:11 +0000 (-0700) Subject: mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=475c9e43bfa7;p=openwrt%2Fstaging%2Fblogic.git mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails. Signed-off-by: Eric Anholt Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c index 0ef0343c603a..32f4046546b5 100644 --- a/drivers/mmc/host/sdhci-bcm2835.c +++ b/drivers/mmc/host/sdhci-bcm2835.c @@ -173,8 +173,11 @@ static int bcm2835_sdhci_probe(struct platform_device *pdev) goto err; } - return sdhci_add_host(host); + ret = sdhci_add_host(host); + if (ret) + goto err; + return 0; err: sdhci_pltfm_free(pdev); return ret;