lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails.
Date
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/mmc/host/sdhci-bcm2835.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c
index 0ef0343..32f4046 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;
--
2.1.4


\
 
 \ /
  Last update: 2015-05-29 23:41    [W:0.049 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site