mmc: dw_mmc: fix incorrect setting of host->data of NULL
authorSeungwon Jeon <tgih.jun@samsung.com>
Tue, 22 May 2012 04:01:13 +0000 (13:01 +0900)
committerChris Ball <cjb@laptop.org>
Wed, 6 Jun 2012 13:37:03 +0000 (09:37 -0400)
Setting host->data to NULL is incorrect sequence in
dw_mci_command_complete. This early setting makes the skip of
dma_unmap_sg in dw_mci_dma_cleanup.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc.c

index 98fe023..b070ee5 100644 (file)
@@ -941,8 +941,8 @@ static void dw_mci_command_complete(struct dw_mci *host, struct mmc_command *cmd
                        mdelay(20);
 
                if (cmd->data) {
-                       host->data = NULL;
                        dw_mci_stop_dma(host);
+                       host->data = NULL;
                }
        }
 }