From: Stefan Wahren Date: Sun, 17 Jan 2016 14:59:00 +0000 (+0000) Subject: mmc: sdhci-iproc: Clean up platform allocations if shdci init fails X-Git-Tag: v4.9.8~2443^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d6ad05777c27c7e8cfb32997a78c8252b85fbb4;p=platform%2Fkernel%2Flinux-rpi3.git mmc: sdhci-iproc: Clean up platform allocations if shdci init fails This patch adopts the changes from 475c9e43bfa7 ("mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails") to sdhci-iproc. Signed-off-by: Stefan Wahren Acked-by: Scott Branden Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 3b423b0..e22060a 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -213,7 +213,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev) host->caps1 = iproc_host->data->caps1; } - return sdhci_add_host(host); + ret = sdhci_add_host(host); + if (ret) + goto err; + + return 0; err: sdhci_pltfm_free(pdev);