Message ID | 20180810091352.30227-1-brgl@bgdev.pl (mailing list archive) |
---|---|
State | Accepted |
Commit | 563a53f3906a6b43692498e5b3ae891fac93a4af |
Headers | show |
Series | spi: davinci: fix a NULL pointer dereference | expand |
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 577084bb911b..a02099c90c5c 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -217,7 +217,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; /*