summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-09-15 15:45:30 +0800
committerSakari Ailus <sakari.ailus@linux.intel.com>2026-09-15 13:01:28 +0300
commit0d2ca640318612402ae1c640d2da56b2914ff994 (patch)
tree99b064b2fb9d7812c4dd66527c6c83fe7d9cb0b1
parent63c578491cb406089b8718f2054eb8328c9dd43c (diff)
downloadlinux-next-0d2ca640318612402ae1c640d2da56b2914ff994.tar.gz
linux-next-0d2ca640318612402ae1c640d2da56b2914ff994.zip
media: i2c: alvium-csi2: balance runtime PM usage count on remove
alvium_probe() increments the runtime PM usage count with pm_runtime_get_noresume() before enabling runtime PM. The probe error path correctly balances this reference with pm_runtime_put_noidle(), but the normal remove path only disables runtime PM. pm_runtime_disable() does not decrement the usage count, so a successful probe followed by driver removal leaves the runtime PM usage count unbalanced. Add the missing pm_runtime_put_noidle() to the remove path, matching the existing probe error cleanup. This issue was found by manual code inspection. Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
-rw-r--r--drivers/media/i2c/alvium-csi2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
index f51f9b987759..f218999e0ed9 100644
--- a/drivers/media/i2c/alvium-csi2.c
+++ b/drivers/media/i2c/alvium-csi2.c
@@ -2523,6 +2523,7 @@ static void alvium_remove(struct i2c_client *client)
* make sure to turn power off manually.
*/
pm_runtime_disable(dev);
+ pm_runtime_put_noidle(dev);
if (!pm_runtime_status_suspended(dev))
alvium_set_power(alvium, false);
pm_runtime_set_suspended(dev);