]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-fsl-dspi: Avoid NULL pointer in dspi_slave_abort for non-DMA mode
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 18 Mar 2020 00:15:58 +0000 (02:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:11:54 +0000 (16:11 +0200)
commit10965ecfa20dc3bc5395c9657ed967677187933d
treeaa083b341c6c6c6bf2ec453188ce084226b3e13e
parent954aaa359e5131edc223ee3e7147467f2620e076
spi: spi-fsl-dspi: Avoid NULL pointer in dspi_slave_abort for non-DMA mode

[ Upstream commit 3d6224e63be39ff26cf416492cb3923cd3d07dd0 ]

The driver does not create the dspi->dma structure unless operating in
DSPI_DMA_MODE, so it makes sense to check for that.

Fixes: f4b323905d8b ("spi: Introduce dspi_slave_abort() function for NXP's dspi SPI driver")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20200318001603.9650-8-olteanv@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-fsl-dspi.c