diff options
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 9e15f41f87be..5d20661bc357 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1334,6 +1334,13 @@ static void sdhci_tasklet_finish(unsigned long param) | |||
1334 | 1334 | ||
1335 | host = (struct sdhci_host*)param; | 1335 | host = (struct sdhci_host*)param; |
1336 | 1336 | ||
1337 | /* | ||
1338 | * If this tasklet gets rescheduled while running, it will | ||
1339 | * be run again afterwards but without any active request. | ||
1340 | */ | ||
1341 | if (!host->mrq) | ||
1342 | return; | ||
1343 | |||
1337 | spin_lock_irqsave(&host->lock, flags); | 1344 | spin_lock_irqsave(&host->lock, flags); |
1338 | 1345 | ||
1339 | del_timer(&host->timer); | 1346 | del_timer(&host->timer); |
@@ -1345,7 +1352,7 @@ static void sdhci_tasklet_finish(unsigned long param) | |||
1345 | * upon error conditions. | 1352 | * upon error conditions. |
1346 | */ | 1353 | */ |
1347 | if (!(host->flags & SDHCI_DEVICE_DEAD) && | 1354 | if (!(host->flags & SDHCI_DEVICE_DEAD) && |
1348 | (mrq->cmd->error || | 1355 | ((mrq->cmd && mrq->cmd->error) || |
1349 | (mrq->data && (mrq->data->error || | 1356 | (mrq->data && (mrq->data->error || |
1350 | (mrq->data->stop && mrq->data->stop->error))) || | 1357 | (mrq->data->stop && mrq->data->stop->error))) || |
1351 | (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { | 1358 | (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { |