All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@codeaurora.org>
To: David Brown <davidb@codeaurora.org>,
	Daniel Walker <dwalker@fifo99.com>,
	Bryan Huntsman <bryanh@codeaurora.org>
Cc: Sahitya Tummala <stummala@codeaurora.org>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: [PATCH 1/6] mmc: msm_sdcc: Handle error cases in probe
Date: Tue, 23 Aug 2011 10:39:13 -0700	[thread overview]
Message-ID: <1314121158-3319-2-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1314121158-3319-1-git-send-email-davidb@codeaurora.org>

From: Sahitya Tummala <stummala@codeaurora.org>

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@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 cfe0c89..0f0b4fd 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1215,7 +1215,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;
@@ -1230,13 +1230,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");
@@ -1377,6 +1379,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:
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2011-08-23 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 17:39 [PATCH 0/6] mmc: msm_sdcc Various fixes David Brown
2011-08-23 17:39 ` David Brown
2011-08-23 17:39 ` David Brown [this message]
2011-08-23 17:39 ` [PATCH 2/6] mmc: msm_sdcc: Enable SDC host->clk only after setting the rate David Brown
2011-08-23 17:39 ` [PATCH 3/6] msm: mmc: Remove "pio_irq" resource David Brown
2011-08-23 17:39   ` David Brown
2011-08-23 17:39   ` David Brown
2011-08-23 17:39 ` [PATCH 4/6] mmc: msm_sdcc: Use MCI_INT_MASK0 for PIO interrupts David Brown
2011-08-23 17:39 ` [PATCH 5/6] mmc: msm_sdcc: Change initialization order of busclk_timer in probe David Brown
2011-08-23 17:39 ` [PATCH 6/6] mmc: msm_sdcc: Handle dma resource not present case David Brown

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=1314121158-3319-2-git-send-email-davidb@codeaurora.org \
    --to=davidb@codeaurora.org \
    --cc=bryanh@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stummala@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.