[PATCH] Input: bcm_iproc_tsc: fix clock prepare leak in close
From: Zhao Feng
Date: Sun Nov 08 2026 - 23:39:03 EST
iproc_ts_start() (the input open callback) enables the controller
clock with clk_prepare_enable(), but iproc_ts_stop() (the close
callback) only calls clk_disable(). Every open/close cycle of the
input device therefore leaks one clock prepare reference, and the
clock can never be unprepared again.
Pair the enable with clk_disable_unprepare().
Fixes: d5ae685f1530 ("Input: add Broadcom iProc touchscreen driver")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Zhao Feng <zhaofeng2@xxxxxxxxxxxxxxxxxxxx>
---
Verified against current upstream master, which still has the
unpaired clk_disable() in iproc_ts_stop(). Not runtime-tested
(no iProc hardware).
drivers/input/touchscreen/bcm_iproc_tsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/bcm_iproc_tsc.c b/drivers/input/touchscreen/bcm_iproc_tsc.c
index 9c84235327..07176f8631 100644
--- a/drivers/input/touchscreen/bcm_iproc_tsc.c
+++ b/drivers/input/touchscreen/bcm_iproc_tsc.c
@@ -330,7 +330,7 @@ static void iproc_ts_stop(struct input_dev *dev)
val = TS_CONTROLLER_PWR_TS;
regmap_update_bits(priv->regmap, REGCTL2, val, val);
- clk_disable(priv->tsc_clk);
+ clk_disable_unprepare(priv->tsc_clk);
}
static int iproc_get_tsc_config(struct device *dev, struct iproc_ts_priv *priv)
--
2.39.2