spi: Fix NULL pointer when setting SPI_CS_HIGH for GPIO CS
Even if the flag use_gpio_descriptors is set, it is possible that cs_gpiods was not allocated, which leads to a kernel crash. Reported-by: "kernelci.org bot" <bot@kernelci.org> Fixes: 3e5ec1db ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20191024141309.22434-1-gregory.clement@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
Showing
Please register or sign in to comment