spi: spi_mpc8xxx.c: Do not use map_tx_dma to unmap rx_dma
diff mbox

Message ID 1274102230-20828-1-git-send-email-Joakim.Tjernlund@transmode.se
State Accepted
Headers show

Commit Message

Joakim Tjernlund May 17, 2010, 1:17 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index c85dbbb..2d54020 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -514,7 +514,7 @@  static void mpc8xxx_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)
 
 	if (mspi->map_tx_dma)
 		dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE);
-	if (mspi->map_tx_dma)
+	if (mspi->map_rx_dma)
 		dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE);
 	mspi->xfer_in_progress = NULL;
 }