]> rtime.felk.cvut.cz Git - linux-imx.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>
Thu, 6 Dec 2012 18:54:54 +0000 (13:54 -0500)
commit25e1897bf59b917a696b84b8cf28a5373157404d
tree34b1186e075e071c446c61ac819234c85b53958f
parentab269128a2cff7abee06f023e6466fc29991738c
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