]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: fix crash on setup stage
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 25 Mar 2015 18:26:26 +0000 (20:26 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 25 Mar 2015 18:54:40 +0000 (11:54 -0700)
commit85c4eaf9805cc96437196216cd1f1fb9fa99fd40
tree04ffdb316fb3a39ee9d60291e985820a5eb3e7b2
parentc1c36ea2ea8456af2a4554ab7887d8fb0cb1e688
spi: dw: fix crash on setup stage

The commit ad02ae5a47fd (spi: Ensure that CS line is in non-active state after
spi_setup()) introduces an unconditional call of spi_set_cs() before ->setup().
The dw_spi_set_cs() relies on that fact that ->setup() is already called, but
it doesn't now. This patch fixes the crash by adding an additional check to
dw_spi_set_cs().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c