diff mbox

[1/2] MMC: SDHCI: Check mrq->cmd in sdhci_tasklet_finish

Message ID 1301488514-20963-1-git-send-email-dp@opensource.wolfsonmicro.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dimitris Papastamos March 30, 2011, 12:35 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 79ebc39..e75d070 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1341,7 +1341,7 @@  static void sdhci_tasklet_finish(unsigned long param)
 	 * upon error conditions.
 	 */
 	if (!(host->flags & SDHCI_DEVICE_DEAD) &&
-		(mrq->cmd->error ||
+	    ((mrq->cmd && mrq->cmd->error) ||
 		 (mrq->data && (mrq->data->error ||
 		  (mrq->data->stop && mrq->data->stop->error))) ||
 		   (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) {