diff options
author | 2014-08-27 19:26:08 +0300 | |
---|---|---|
committer | 2014-08-27 17:32:46 +0100 | |
commit | 08a707b87874eaaa0f336ab604ecd6e5e9f286dd (patch) | |
tree | aad9b04c1993b91b8b5266ddb108f716b0542aab /drivers/spi/spi-dw.c | |
parent | spi: dw-pci: fix bug when regs left uninitialized (diff) | |
download | linux-08a707b87874eaaa0f336ab604ecd6e5e9f286dd.tar.gz linux-08a707b87874eaaa0f336ab604ecd6e5e9f286dd.tar.bz2 linux-08a707b87874eaaa0f336ab604ecd6e5e9f286dd.zip |
spi: dw: fix kernel crash due to NULL pointer dereference
The obvious fix after the commit d9c73bb8a3a5 "spi: dw: add support for gpio
controlled chip select". This patch fixes the issue by using locally defined
temporary variable.
Fixes: d9c73bb8a3a5 (spi: dw: add support for gpio controlled chip select)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r-- | drivers/spi/spi-dw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 29f33143b795..670f0627f3bf 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -271,7 +271,7 @@ static void giveback(struct dw_spi *dws) transfer_list); if (!last_transfer->cs_change) - spi_chip_sel(dws, dws->cur_msg->spi, 0); + spi_chip_sel(dws, msg->spi, 0); spi_finalize_current_message(dws->master); } |