[PATCH] i2c: img-scb: disable autosuspend on remove

From: Guangshuo Li

Date: Mon Sep 14 2026 - 05:02:01 EST


img_i2c_probe() enables runtime PM autosuspend with
pm_runtime_use_autosuspend(). The probe error path correctly undoes
this setting with pm_runtime_dont_use_autosuspend(), but the normal
remove path only disables runtime PM and leaves autosuspend enabled.

The runtime PM API requires pm_runtime_use_autosuspend() to be undone
with pm_runtime_dont_use_autosuspend() at driver exit unless runtime PM
was enabled with devm_pm_runtime_enable().

Add the missing pm_runtime_dont_use_autosuspend() call to the remove
path so that the runtime PM state is fully restored when the driver is
unbound.

This issue was found by manual code inspection.

Fixes: 93222bd9b966 ("i2c: img-scb: Add runtime PM")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
---
drivers/i2c/busses/i2c-img-scb.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 88192c25c44c..9cfa403cda8e 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1415,6 +1415,7 @@ static void img_i2c_remove(struct platform_device *dev)
pm_runtime_disable(&dev->dev);
if (!pm_runtime_status_suspended(&dev->dev))
img_i2c_runtime_suspend(&dev->dev);
+ pm_runtime_dont_use_autosuspend(&dev->dev);
}

static int img_i2c_runtime_suspend(struct device *dev)
--
2.43.0