diff options
author | Simon Baatz <gmbnomis@gmail.com> | 2013-06-09 22:14:16 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 10:23:52 -0400 |
commit | 47caa84fb61ac94e675c08fb45f50918766688bd (patch) | |
tree | 6ab19111f945ad66b45c6f0121c3abcbb57c69e8 /drivers/mmc/host/sdhci-tegra.c | |
parent | d2cf6071cc09337eb68d960bcba94d2998de6172 (diff) | |
download | linux-47caa84fb61ac94e675c08fb45f50918766688bd.tar.bz2 |
mmc: tegra: handle mmc_of_parse() errors during probe
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-tegra.c')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index c8b058283a06..5b7b2eba8a54 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -205,7 +205,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = { }; MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match); -static void sdhci_tegra_parse_dt(struct device *dev) +static int sdhci_tegra_parse_dt(struct device *dev) { struct device_node *np = dev->of_node; struct sdhci_host *host = dev_get_drvdata(dev); @@ -213,7 +213,7 @@ static void sdhci_tegra_parse_dt(struct device *dev) struct sdhci_tegra *tegra_host = pltfm_host->priv; tegra_host->power_gpio = of_get_named_gpio(np, "power-gpios", 0); - mmc_of_parse(host->mmc); + return mmc_of_parse(host->mmc); } static int sdhci_tegra_probe(struct platform_device *pdev) @@ -245,7 +245,9 @@ static int sdhci_tegra_probe(struct platform_device *pdev) tegra_host->soc_data = soc_data; pltfm_host->priv = tegra_host; - sdhci_tegra_parse_dt(&pdev->dev); + rc = sdhci_tegra_parse_dt(&pdev->dev); + if (rc) + goto err_parse_dt; if (gpio_is_valid(tegra_host->power_gpio)) { rc = gpio_request(tegra_host->power_gpio, "sdhci_power"); @@ -279,6 +281,7 @@ err_clk_get: if (gpio_is_valid(tegra_host->power_gpio)) gpio_free(tegra_host->power_gpio); err_power_req: +err_parse_dt: err_alloc_tegra_host: sdhci_pltfm_free(pdev); return rc; |