4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bartosz Golaszewski <bgolaszew...@baylibre.com>

commit 563a53f3906a6b43692498e5b3ae891fac93a4af 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 <bgolaszew...@baylibre.com>
Signed-off-by: Mark Brown <broo...@kernel.org>
Cc: sta...@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 drivers/spi/spi-davinci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -217,7 +217,7 @@ static void davinci_spi_chipselect(struc
        pdata = &dspi->pdata;
 
        /* program delay transfers if tx_delay is non zero */
-       if (spicfg->wdelay)
+       if (spicfg && spicfg->wdelay)
                spidat1 |= SPIDAT1_WDEL;
 
        /*


Reply via email to