[patch v4 09/17] MMC: S3C24XX: Ensure host->mrq->data is valid

From: Ben Dooks
Date: Mon Jun 30 2008 - 11:32:36 EST


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

Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>

Index: linux-2.6.26-rc8-next20080627/drivers/mmc/host/s3cmci.c
===================================================================
--- linux-2.6.26-rc8-next20080627.orig/drivers/mmc/host/s3cmci.c 2008-06-30 12:36:42.000000000 +0100
+++ linux-2.6.26-rc8-next20080627/drivers/mmc/host/s3cmci.c 2008-06-30 12:36:49.000000000 +0100
@@ -353,7 +353,8 @@ static void pio_tasklet(unsigned long da
(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);

--
Ben (ben@xxxxxxxxx, http://www.fluff.org/)

'a smiley only costs 4 bytes'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/