Skip to content

Commit

Permalink
media: ccs-core.c: fix failure to call clk_disable_unprepare
Browse files Browse the repository at this point in the history
[ Upstream commit eca89cf ]

Fixes smatch warning:

drivers/media/i2c/ccs/ccs-core.c:1676 ccs_power_on() warn: 'sensor->ext_clk' from clk_prepare_enable() not released on lines: 1606.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Hans Verkuil authored and gregkh committed Jun 9, 2022
1 parent 1835d45 commit 4c66b0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/i2c/ccs/ccs-core.c
Expand Up @@ -1603,8 +1603,11 @@ static int ccs_power_on(struct device *dev)
usleep_range(1000, 2000);
} while (--retry);

if (!reset)
return -EIO;
if (!reset) {
dev_err(dev, "software reset failed\n");
rval = -EIO;
goto out_cci_addr_fail;
}
}

if (sensor->hwcfg.i2c_addr_alt) {
Expand Down

0 comments on commit 4c66b0e

Please sign in to comment.