diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-05-02 10:18:54 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-13 12:02:22 +0300 |
commit | 6287dee83dfae7675bc8324dd057ca12fd58e4df (patch) | |
tree | 094d594c69aecc6e063cc1447e7fe2f11dd4bdfe | |
parent | eca89cf60b040ee2cae693ea72a0364284f3084c (diff) | |
download | linux-6287dee83dfae7675bc8324dd057ca12fd58e4df.tar.xz |
media: s5k6a3: add missing clk_disable_unprepare
Fix smatch warning:
drivers/media/i2c/s5k6a3.c:234 __s5k6a3_power_on() warn: 'sensor->clock' from clk_prepare_enable() not released on lines: 234.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/media/i2c/s5k6a3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index b97dd6149e90..f6ecf6f92bb2 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -213,7 +213,7 @@ static int __s5k6a3_power_on(struct s5k6a3 *sensor) for (i++; i < S5K6A3_NUM_SUPPLIES; i++) { ret = regulator_enable(sensor->supplies[i].consumer); if (ret < 0) - goto error_reg_dis; + goto error_clk; } gpio_set_value(sensor->gpio_reset, 1); @@ -226,6 +226,8 @@ static int __s5k6a3_power_on(struct s5k6a3 *sensor) msleep(20); return 0; +error_clk: + clk_disable_unprepare(sensor->clock); error_reg_dis: for (--i; i >= 0; --i) regulator_disable(sensor->supplies[i].consumer); |