diff options
| author | Hans Verkuil <[email protected]> | 2022-05-02 07:17:46 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2022-05-13 09:02:22 +0000 |
| commit | eca89cf60b040ee2cae693ea72a0364284f3084c (patch) | |
| tree | 72bfaa85e3e2624c310b93ebd06332456c6de5a0 /drivers/media/i2c/ccs/ccs-core.c | |
| parent | media: cx25821: request_irq -> devm_request_irq (diff) | |
| download | kernel-eca89cf60b040ee2cae693ea72a0364284f3084c.tar.gz kernel-eca89cf60b040ee2cae693ea72a0364284f3084c.zip | |
media: ccs-core.c: fix failure to call clk_disable_unprepare
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 <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs-core.c')
| -rw-r--r-- | drivers/media/i2c/ccs/ccs-core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 55bd303f0e18..7609add2aff4 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -1602,8 +1602,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) { |
