spi: imx: Fix possible NULL pointer deref
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 17 Mar 2016 08:21:50 +0000 (09:21 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 17 Mar 2016 11:44:34 +0000 (11:44 +0000)
commitcd8dd41a33264a4602539711f76670c2a1f4d007
tree02dc88065f7ef16bf68912944e0a21f824354e56
parent793c7f9212fdb7bea5e017427e750afa11217c29
spi: imx: Fix possible NULL pointer deref

transfer could be NULL in spi_imx_can_dma() when it's called from
spi_imx_setupxfer() with a NULL transfer. Test for a NULL pointer before
dereferencing it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c