Message ID | 20210720160749.73928-1-colin.king@canonical.com |
---|---|
State | Accepted |
Commit | 11b982e950d2138e90bd120501df10a439006ff8 |
Headers | show |
Series | [next] media: cxd2880-spi: Fix a null pointer dereference on error handling path | expand |
diff --git a/drivers/media/spi/cxd2880-spi.c b/drivers/media/spi/cxd2880-spi.c index b91a1e845b97..506f52c1af10 100644 --- a/drivers/media/spi/cxd2880-spi.c +++ b/drivers/media/spi/cxd2880-spi.c @@ -618,7 +618,7 @@ cxd2880_spi_probe(struct spi_device *spi) fail_attach: dvb_unregister_adapter(&dvb_spi->adapter); fail_adapter: - if (!dvb_spi->vcc_supply) + if (dvb_spi->vcc_supply) regulator_disable(dvb_spi->vcc_supply); fail_regulator: kfree(dvb_spi);