From 475c9e43bfa76198c2d0b4310ad406ea2206aba0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 29 May 2015 14:06:11 -0700 Subject: mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails. Signed-off-by: Eric Anholt Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-bcm2835.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') 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; -- cgit v1.2.3