MMC: S3C24XX: Ensure host->mrq->data is valid

Fix a crash if host->mrq->data is NULL on ending a transfer.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
Ben Dooks 2008-06-30 22:40:31 +01:00 committed by Pierre Ossman
parent cf0984c8ed
commit 7c14450ed6
1 changed files with 2 additions and 1 deletions

View File

@ -353,7 +353,8 @@ static void pio_tasklet(unsigned long data)
(host->pio_active == XFER_READ) ? "read" : "write",
host->pio_count, host->pio_words);
host->mrq->data->error = -EINVAL;
if (host->mrq->data)
host->mrq->data->error = -EINVAL;
}
finalize_request(host);