Support for Marvell 7042 Chip
[powerpc.git] / drivers / spi / spi_mpc83xx.c
index ff0b048..e9798bf 100644 (file)
@@ -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;                                            \