linux-stable/drivers/media/spi
Colin Ian King 11b982e950 media: cxd2880-spi: Fix a null pointer dereference on error handling path
Currently the null pointer check on dvb_spi->vcc_supply is inverted and
this leads to only null values of the dvb_spi->vcc_supply being passed
to the call of regulator_disable causing null pointer dereferences.
Fix this by only calling regulator_disable if dvb_spi->vcc_supply is
not null.

Addresses-Coverity: ("Dereference after null check")

Fixes: dcb0145821 ("media: cxd2880-spi: Fix an error handling path")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-09-30 10:07:40 +02:00
..
Kconfig media: i2c/Kconfig: use sub-menus for I2C support 2020-04-16 10:34:40 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cxd2880-spi.c media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-09-30 10:07:40 +02:00
gs1662.c media: spi: gs1662: Use new structure for SPI transfer delays 2020-03-05 22:46:25 +01:00