mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
media: i2c: ov9282: Add missing clk_disable_unprepare to error path
If ov9282_power_on failed the I2C write, it returned without releasing
clocks or regulators. Fix this.
Fixes: 6f7def3d8a
("media: i2c: ov9282: Add selection for CSI2 clock mode")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
483c84bf50
commit
b2ea130c25
1 changed files with 3 additions and 1 deletions
|
@ -1253,11 +1253,13 @@ static int ov9282_power_on(struct device *dev)
|
|||
OV9282_GATED_CLOCK : 0);
|
||||
if (ret) {
|
||||
dev_err(ov9282->dev, "fail to write MIPI_CTRL00");
|
||||
return ret;
|
||||
goto error_clk;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error_clk:
|
||||
clk_disable_unprepare(ov9282->inclk);
|
||||
error_reset:
|
||||
gpiod_set_value_cansleep(ov9282->reset_gpio, 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue