Browse Source

mmc: dw_mmc: fix incorrect setting of host->data of NULL

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>
Seungwon Jeon 13 years ago
parent
commit
fda5f73686
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mmc/host/dw_mmc.c

+ 1 - 1
drivers/mmc/host/dw_mmc.c

@@ -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;
 		}
 	}
 }