analogix_dp_set_bridge() calls pm_runtime_get_sync() to power up the
DP core, but if the subsequent analogix_dp_init_analog_func() fails it
returns the error directly, without the matching pm_runtime_put_sync().
The two other error paths in the function already jump to the
out_dp_init label, which drops the reference.
Every failed bridge enable therefore increments the runtime PM usage
counter, and repeated failures (e.g. during hotplug storms) prevent
the device from ever runtime suspending again.
Jump to out_dp_init like the other error paths so the runtime PM
reference is released.
Fixes: 3efe2ace7f5b ("drm/bridge: analogix_dp: move basic controller init into
runtime PM")
Signed-off-by: laixiangwu <[email protected]>
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 6df696374..c9c1375a9 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -998,7 +998,7 @@ static int analogix_dp_set_bridge(struct analogix_dp_device
*dp)
ret = analogix_dp_init_analog_func(dp);
if (ret)
- return ret;
+ goto out_dp_init;
/*
* According to DP spec v1.3 chap 3.5.1.2 Link Training,