lkml.org 
[lkml]   [2008]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch v5 08/16] 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>

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@fluff.org, http://www.fluff.org/)

'a smiley only costs 4 bytes'


\
 
 \ /
  Last update: 2008-06-30 23:51    [W:0.132 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site