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>
This commit is contained in:
Eric Anholt 2015-05-29 14:06:11 -07:00 committed by Ulf Hansson
parent 74fd5e30cc
commit 475c9e43bf

View File

@ -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;