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-05-10 09:35:42 -07:00
2017-05-09 10:01:15 -07:00
2017-05-09 15:40:28 -07:00
2017-05-09 10:01:15 -07:00
2017-05-04 19:15:35 -07:00
2017-04-30 11:45:31 -07:00
2017-05-09 15:15:47 -07:00
2017-05-05 19:33:07 -07:00
2017-05-11 10:44:22 -07:00
2017-04-27 11:54:49 +01:00
2017-05-12 10:04:09 -07:00
2017-04-20 09:54:24 +02:00
2017-05-09 10:01:15 -07:00
2017-05-12 10:04:09 -07:00
2017-05-04 19:15:35 -07:00
2017-05-04 19:15:35 -07:00
2017-05-09 10:01:15 -07:00
2017-05-10 19:37:14 -07:00
2017-05-10 11:33:08 -07:00
2017-05-12 10:04:09 -07:00
2017-05-05 19:33:07 -07:00
2017-05-05 11:36:44 -07:00
2017-05-11 11:12:26 -07:00