summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/msm_sdcc.c
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-11-24 23:24:55 +0300
committerDaniel Walker <dwalker@codeaurora.org>2010-03-18 23:37:17 +0300
commitb3b0ca84cfec581fba3ea8efaa8052cb5e6fc857 (patch)
treec558feab0c26e285fafca07e266d5f1b19b7d0bb /drivers/mmc/host/msm_sdcc.c
parentf4748499d3dc5e7cadecb977f0d4f1f4f4a8d8c5 (diff)
downloadlinux-b3b0ca84cfec581fba3ea8efaa8052cb5e6fc857.tar.xz
mmc: msm_sdcc: Fix issue where we might not end a sucessfull request
Signed-off-by: San Mehat <san@google.com> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'drivers/mmc/host/msm_sdcc.c')
-rw-r--r--drivers/mmc/host/msm_sdcc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index bdafb642a713..3ea66971edfc 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -208,6 +208,7 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd,
mrq = host->curr.mrq;
BUG_ON(!mrq);
+ WARN_ON(!mrq->data);
if (!(result & DMOV_RSLT_VALID)) {
pr_err("msmsdcc: Invalid DataMover result\n");
@@ -719,14 +720,13 @@ static void
msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status,
void __iomem *base)
{
- struct mmc_data *data;
+ struct mmc_data *data = host->curr.data;
if (status & (MCI_CMDSENT | MCI_CMDRESPEND | MCI_CMDCRCFAIL |
MCI_CMDTIMEOUT) && host->curr.cmd) {
msmsdcc_do_cmdirq(host, status);
}
- data = host->curr.data;
if (!data)
return;
@@ -739,7 +739,8 @@ msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status,
msm_dmov_stop_cmd(host->dma.channel,
&host->dma.hdr, 0);
else {
- msmsdcc_stop_data(host);
+ if (host->curr.data)
+ msmsdcc_stop_data(host);
if (!data->stop)
msmsdcc_request_end(host, data->mrq);
else