提交 08a707b8 编写于 作者: A Andy Shevchenko 提交者: Mark Brown

spi: dw: fix kernel crash due to NULL pointer dereference

The obvious fix after the commit d9c73bb8 "spi: dw: add support for gpio
controlled chip select". This patch fixes the issue by using locally defined
temporary variable.

Fixes: d9c73bb8 (spi: dw: add support for gpio controlled chip select)
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org>
上级 c9d5d6fe
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册