Jiada Wang 179547e143 spi: imx: fix issue when tx_buf or rx_buf is NULL
In case either transfer->tx_buf or transfer->rx_buf is NULL,
manipulation of buffer in spi_imx_u32_swap_u[8|16]() will cause
NULL pointer dereference crash.

Add buffer check at very beginning of spi_imx_u32_swap_u[8|16](),
to avoid such crash.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19 17:57:08 +01:00
..
2017-02-20 17:26:11 -08:00
2016-08-19 16:24:39 +01:00
2016-07-07 11:44:43 +02:00
2015-12-07 20:09:09 +00:00
2017-04-07 18:15:20 +01:00
2017-01-23 18:09:37 +00:00
2017-03-13 16:48:40 +00:00