From 03cfbbc1fc06db50991da48593bf6c2ee7cf092a Mon Sep 17 00:00:00 2001 From: Asutosh Das Date: Fri, 21 Feb 2014 11:28:36 +0530 Subject: mmc: sdhci: finish the request if sdhc is in bad state In the current code, if sdhci_check_state returns true a tasklet is scheduled which doesn't complete the request if host->mrq is NULL, which is the case, if sdhci is in bad state. This would make the mmcqd thread wait for completion infinitely. Hence, complete the request if sdhci_check_state returns true instead of scheduling the tasklet. CRs-Fixed: 615537 Change-Id: I8e2950c3999ac3806f9d631c52d86f0dc13b992f Signed-off-by: Asutosh Das --- drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 51eae3ff259e..5e483e84aee3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1575,7 +1575,8 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) mrq->cmd->error = -EIO; if (mrq->data) mrq->data->error = -EIO; - tasklet_schedule(&host->finish_tasklet); + mmc_request_done(host->mmc, mrq); + sdhci_runtime_pm_put(host); return; } -- cgit v1.2.3