]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl
authorXiaolei Wang <xiaolei.wang@windriver.com>
Wed, 25 Feb 2026 08:56:21 +0000 (16:56 +0800)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 11 Mar 2026 00:05:35 +0000 (01:05 +0100)
commitf11ae9c04f8368a3b5a0280ef595198dace1c983
treed9d82e78b136b9e6789e8f87ceb60e4a2576242a
parent8dd088b8b106f7b119664f965b691785998edcfb
media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl

Three control cases (AUTOGAIN, EXPOSURE_AUTO, ANALOGUE_GAIN) directly
return without calling pm_runtime_put(), causing runtime PM reference
count leaks.

Change these cases from 'return' to 'ret = ... break' pattern to ensure
pm_runtime_put() is always called before function exit.

Fixes: 4f66f36388d5 ("media: i2c: ov5647: Convert to CCI register access helpers")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov5647.c