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: NSascha Hauer <s.hauer@pengutronix.de> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录