diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi_mpc83xx.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi_s3c24xx.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index ff0b048..e9798bf 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -112,6 +112,8 @@ u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \ { \ u32 data; \ const type * tx = mpc83xx_spi->tx; \ + if (!tx) \ + return 0; \ data = *tx++; \ mpc83xx_spi->tx = tx; \ return data; \ diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 2ebe1fc..8ca0871 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -174,7 +174,7 @@ static int s3c24xx_spi_setup(struct spi_device *spi) static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count) { - return hw->tx ? hw->tx[count] : 0xff; + return hw->tx ? hw->tx[count] : 0; } static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t) |