From: Sahitya Tummala <stummala@codeaurora.org>
To: davidb@codeaurora.org, bryanh@codeaurora.org, dwalker@fifo99.com
Cc: linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
san@google.com, Sahitya Tummala <stummala@codeaurora.org>
Subject: [PATCH V2 2/7] mmc: msm_sdcc: Handle error cases in probe
Date: Mon, 2 May 2011 18:06:05 +0530 [thread overview]
Message-ID: <1304339765-7508-1-git-send-email-stummala@codeaurora.org> (raw)
In-Reply-To: <1303796066-6784-2-git-send-email-stummala@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
---
drivers/mmc/host/msm_sdcc.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index d06539d..66ef5c3 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1206,7 +1206,7 @@ msmsdcc_probe(struct platform_device *pdev)
host->base = ioremap(memres->start, PAGE_SIZE);
if (!host->base) {
ret = -ENOMEM;
- goto out;
+ goto host_free;
}
host->cmd_irqres = cmd_irqres;
@@ -1221,13 +1221,15 @@ msmsdcc_probe(struct platform_device *pdev)
/*
* Setup DMA
*/
- msmsdcc_init_dma(host);
+ ret = msmsdcc_init_dma(host);
+ if (ret)
+ goto ioremap_free;
/* Get our clocks */
host->pclk = clk_get(&pdev->dev, "sdc_pclk");
if (IS_ERR(host->pclk)) {
ret = PTR_ERR(host->pclk);
- goto host_free;
+ goto dma_free;
}
host->clk = clk_get(&pdev->dev, "sdc_clk");
@@ -1368,6 +1370,12 @@ msmsdcc_probe(struct platform_device *pdev)
clk_put(host->clk);
pclk_put:
clk_put(host->pclk);
+dma_free:
+ dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata),
+ host->dma.nc, host->dma.nc_busaddr);
+ioremap_free:
+ tasklet_kill(&host->dma_tlet);
+ iounmap(host->base);
host_free:
mmc_free_host(mmc);
out:
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-05-02 12:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 5:34 [PATCH 1/7] mmc: msm_sdcc: handle the platform gpio_data not present case Sahitya Tummala
2011-04-26 5:34 ` [PATCH 2/7] mmc: msm_sdcc: Handle error cases in probe Sahitya Tummala
2011-05-02 12:36 ` Sahitya Tummala [this message]
2011-04-26 5:34 ` [PATCH 3/7] mmc: msm_sdcc: Enable SDC host->clk only after setting the rate Sahitya Tummala
2011-05-02 12:37 ` [PATCH V2 " Sahitya Tummala
2011-04-26 5:34 ` [PATCH 4/7] msm: mmc: Remove "pio_irq" resource Sahitya Tummala
2011-05-02 12:37 ` [PATCH V2 " Sahitya Tummala
2011-04-26 5:34 ` [PATCH 5/7] mmc: msm_sdcc: Use MCI_INT_MASK0 for PIO interrupts Sahitya Tummala
2011-04-27 15:52 ` Stephen Boyd
2011-05-02 12:39 ` [PATCH V2 " Sahitya Tummala
2011-04-26 5:34 ` [PATCH 6/7] mmc: msm_sdcc: Change initialization order of busclk_timer in probe Sahitya Tummala
2011-05-02 12:40 ` [PATCH V2 " Sahitya Tummala
2011-04-26 5:34 ` [PATCH 7/7] mmc: msm_sdcc: Handle dma resource not present case Sahitya Tummala
2011-05-02 12:40 ` [PATCH V2 " Sahitya Tummala
2011-05-02 12:33 ` [PATCH V2 1/7] mmc: msm_sdcc: handle the platform gpio_data " Sahitya Tummala
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=1304339765-7508-1-git-send-email-stummala@codeaurora.org \
--to=stummala@codeaurora.org \
--cc=bryanh@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=dwalker@fifo99.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=san@google.com \
/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).