]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: ccs-core.c: fix failure to call clk_disable_unprepare
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 2 May 2022 07:17:46 +0000 (09:17 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:22 +0000 (11:02 +0200)
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>
drivers/media/i2c/ccs/ccs-core.c

index 55bd303f0e185c1408095ba39636c78d16a2e372..7609add2aff497ab7be774e37ebb6ece43f7431d 100644 (file)
@@ -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) {