diff mbox

spi_mpc8xxx: fix writing to adress 0

Message ID 20100916070420.95083C7391@messagerie.si.c-s.fr (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Christophe Leroy Sept. 16, 2010, 7:04 a.m. UTC
None
diff mbox

Patch

diff -urN a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
--- a/drivers/spi/spi_mpc8xxx.c	2010-09-08 16:42:30.000000000 +0200
+++ b/drivers/spi/spi_mpc8xxx.c	2010-09-08 16:43:50.000000000 +0200
@@ -438,7 +438,7 @@ 
 			dev_err(dev, "unable to map tx dma\n");
 			return -ENOMEM;
 		}
-	} else {
+	} else if (t->tx_buf) {
 		mspi->tx_dma = t->tx_dma;
 	}
 
@@ -449,7 +449,7 @@ 
 			dev_err(dev, "unable to map rx dma\n");
 			goto err_rx_dma;
 		}
-	} else {
+	} else if (t->rx_buf) {
 		mspi->rx_dma = t->rx_dma;
 	}