From: Simon Baatz <gmbnomis@gmail.com>
To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org
Cc: Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Chris Ball <cjb@laptop.org>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V3 06/10] mmc: tegra: handle mmc_of_parse() errors during probe
Date: Tue, 21 May 2013 01:01:47 +0200 [thread overview]
Message-ID: <1369090911-1479-7-git-send-email-gmbnomis@gmail.com> (raw)
In-Reply-To: <1369090911-1479-1-git-send-email-gmbnomis@gmail.com>
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
---
drivers/mmc/host/sdhci-tegra.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index e0dba74..7eb62f8 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");
@@ -278,6 +280,7 @@ err_add_host:
err_clk_get:
if (gpio_is_valid(tegra_host->power_gpio))
gpio_free(tegra_host->power_gpio);
+err_parse_dt:
err_power_req:
err_alloc_tegra_host:
sdhci_pltfm_free(pdev);
--
1.7.9.5
next prev parent reply other threads:[~2013-05-20 23:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 23:01 [PATCH V3 00/10] mmc_of_parse() adaptations, DT support for Sheevaplugs Simon Baatz
2013-05-20 23:01 ` [PATCH V3 01/10] mmc: return mmc_of_parse() errors to caller Simon Baatz
2013-05-21 7:00 ` Ulf Hansson
2013-05-20 23:01 ` [PATCH V3 02/10] mmc: sh_mmcif: handle mmc_of_parse() errors during probe Simon Baatz
2013-05-20 23:01 ` [PATCH V3 03/10] mmc: tmio-mmc: " Simon Baatz
2013-05-20 23:01 ` [PATCH V3 04/10] mmc: mxcmmc: " Simon Baatz
2013-05-20 23:01 ` [PATCH V3 05/10] mmc: sdhci-pxav3: " Simon Baatz
2013-05-20 23:01 ` Simon Baatz [this message]
2013-05-20 23:01 ` [PATCH V3 07/10] ARM: mvebu: Use standard MMC binding for all users of mvsdio Simon Baatz
2013-05-20 23:01 ` [PATCH V3 08/10] mmc: mvsdio: use standard MMC device-tree binding parser mmc_of_parse() Simon Baatz
2013-05-20 23:01 ` [PATCH V3 09/10] ARM: Kirkwood: Add dts files for Sheevaplug and eSATA Sheevaplug Simon Baatz
2013-05-21 5:11 ` Andrew Lunn
2013-05-20 23:01 ` [PATCH V3 10/10] ARM: Kirkwood: add DT support for Sheevaplug and Sheevaplug eSATA Simon Baatz
2013-05-21 5:13 ` Andrew Lunn
2013-05-21 13:14 ` [PATCH V3 00/10] mmc_of_parse() adaptations, DT support for Sheevaplugs Jason Cooper
2013-05-22 19:25 ` Simon Baatz
[not found] ` <20130522192501.GC25367-2BA9cf72eNkOIzVOb1FTxg@public.gmane.org>
2013-05-23 11:23 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369090911-1479-7-git-send-email-gmbnomis@gmail.com \
--to=gmbnomis@gmail.com \
--cc=andrew@lunn.ch \
--cc=cjb@laptop.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=g.liakhovetski@gmx.de \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).