--- c279fbc4c2e54059d3c06fcec327b59df287bb84 +++ e6c65a78c46cc21a14cb4a903ba0a60b1c63010d @@ -1266,6 +1266,13 @@ static void sdhci_tasklet_finish(unsigne host = (struct sdhci_host*)param; + /* + * If this tasklet gets rescheduled while running, it will + * be run again afterwards but without any active request. + */ + if (!host->mrq) + return; + spin_lock_irqsave(&host->lock, flags); del_timer(&host->timer); @@ -1277,7 +1284,7 @@ static void sdhci_tasklet_finish(unsigne * 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))) {