From: Ben Dooks Date: Mon, 30 Jun 2008 21:40:31 +0000 (+0100) Subject: MMC: S3C24XX: Ensure host->mrq->data is valid X-Git-Tag: v2.6.27-rc1~1047^2~19 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7c14450ed6ab4ed453b2bf216ca3aaa7a5402af3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 4fd11d8864e..ffd9269a187 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -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);