diff mbox

[2/2] MMC: SDHCI: Check mrq != NULL in sdhci_tasklet_finish

Message ID 1301488514-20963-2-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 e75d070..19f4ba6 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 && mrq->cmd->error) ||
+	    mrq && ((mrq->cmd && mrq->cmd->error) ||
 		 (mrq->data && (mrq->data->error ||
 		  (mrq->data->stop && mrq->data->stop->error))) ||
 		   (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) {