Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 6f7def3d8a65 ("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>

authored by

Dave Stevenson and committed by
Mauro Carvalho Chehab
b2ea130c 483c84bf

+3 -1
+3 -1
drivers/media/i2c/ov9282.c
··· 1253 1253 OV9282_GATED_CLOCK : 0); 1254 1254 if (ret) { 1255 1255 dev_err(ov9282->dev, "fail to write MIPI_CTRL00"); 1256 - return ret; 1256 + goto error_clk; 1257 1257 } 1258 1258 1259 1259 return 0; 1260 1260 1261 + error_clk: 1262 + clk_disable_unprepare(ov9282->inclk); 1261 1263 error_reset: 1262 1264 gpiod_set_value_cansleep(ov9282->reset_gpio, 0); 1263 1265