Skip to content

Commit b2ea130

Browse files
6by9mchehab
authored andcommitted
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: 6f7def3 ("media: i2c: ov9282: Add selection for CSI2 clock mode") Signed-off-by: Dave Stevenson <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 483c84b commit b2ea130

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/media/i2c/ov9282.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,13 @@ static int ov9282_power_on(struct device *dev)
12531253
OV9282_GATED_CLOCK : 0);
12541254
if (ret) {
12551255
dev_err(ov9282->dev, "fail to write MIPI_CTRL00");
1256-
return ret;
1256+
goto error_clk;
12571257
}
12581258

12591259
return 0;
12601260

1261+
error_clk:
1262+
clk_disable_unprepare(ov9282->inclk);
12611263
error_reset:
12621264
gpiod_set_value_cansleep(ov9282->reset_gpio, 0);
12631265

0 commit comments

Comments
 (0)