mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
spi: davinci: fix a NULL pointer dereference
commit 563a53f390 upstream.
On non-OF systems spi->controlled_data may be NULL. This causes a NULL
pointer derefence on dm365-evm.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b4de9ac2c7
commit
c2b736ff27
|
|
@ -220,7 +220,7 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
|
|||
pdata = &dspi->pdata;
|
||||
|
||||
/* program delay transfers if tx_delay is non zero */
|
||||
if (spicfg->wdelay)
|
||||
if (spicfg && spicfg->wdelay)
|
||||
spidat1 |= SPIDAT1_WDEL;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user