]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmc: omap_hsmmc: Fix Oops in case of data errors
authorBalaji T K <balajitk@ti.com>
Mon, 19 Nov 2012 16:29:55 +0000 (21:59 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Dec 2012 18:42:59 +0000 (13:42 -0500)
commitf95bf262a1484346cbad73e44a02d2110d646015
tree049619405df9251c47aeffbeb8c75a36044c31f0
parent2e0b5a832fec90a5dc1f67077283b98766765517
mmc: omap_hsmmc: Fix Oops in case of data errors

ae4bf788ee9 ("mmc: omap_hsmmc: consolidate error report handling of HSMMC
IRQ") sets both end_cmd and end_trans to 1.

Setting end_cmd to 1 for Data Timeout/CRC leads to NULL pointer dereference of
host->cmd as the command complete has previously been handled.
Set end_cmd only in case of command Timeout/CRC.

Moreover host->cmd->error should not be updated on data error case, only
host->data->error needs to be updated.

Signed-off-by: Balaji T K <balajitk@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/omap_hsmmc.c