Skip to content

Commit

Permalink
mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Eric Anholt authored and Ulf Hansson committed Jun 1, 2015
1 parent 74fd5e3 commit 475c9e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mmc/host/sdhci-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 475c9e4

Please sign in to comment.