Signed-off-by: Andreas Fenkart <andreas.fenkart@xxxxxxxxxxxxxxxxxxx> --- drivers/mmc/host/omap_hsmmc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 21ca331..13ef4a0 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -991,9 +991,12 @@ static inline void omap_hsmmc_reset_controller_fsm(struct omap_hsmmc_host *host, static void hsmmc_command_incomplete(struct omap_hsmmc_host *host, int err) { omap_hsmmc_reset_controller_fsm(host, SRC); - host->cmd->error = err; + + if (host->cmd) + host->cmd->error = err; if (host->data) { + host->data->error = err; omap_hsmmc_reset_controller_fsm(host, SRD); omap_hsmmc_dma_cleanup(host, err); } @@ -1022,7 +1025,7 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) } } - if (end_cmd || ((status & CC) && host->cmd)) + if ((end_cmd || (status & CC)) && host->cmd) omap_hsmmc_cmd_done(host, host->cmd); if ((end_trans || (status & TC)) && host->mrq) omap_hsmmc_xfer_done(host, data); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html