diff options
author | Eric Anholt | 2015-05-29 14:06:11 -0700 |
---|---|---|
committer | Ulf Hansson | 2015-06-01 09:56:07 +0200 |
commit | 475c9e43bfa76198c2d0b4310ad406ea2206aba0 (patch) | |
tree | efdbd685a9ee5ccd7c1d4bba2cf6d37b045419d3 /drivers/mmc | |
parent | 74fd5e30cc0b201a3800eb3743e059f34bd57fbf (diff) |
mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-bcm2835.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |