spi: dw: fix kernel crash due to NULL pointer dereference
PATCH 1/1 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.
Signed-off-by Andy Shevchenko <[email protected]>
Cc <[email protected]> # v3.16+
--- drivers/spi/spi-dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-dw.c +1 -1
@@ -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); }
Signature · 1 line
2.1.0
Quoted 3 lines · Andy Shevchenko
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.
Applied, thanks.
Mark Brown
AppliedQuoted 6 lines · Andy Shevchenko
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.Cc <[email protected]> # v3.16+
Applied, but to repeat please use Fixes.