Skip to content

Commit d4f5a09

Browse files
Navidemdaeinki
authored andcommitted
drm/exynos: fix ref count leak in mic_pre_enable
in mic_pre_enable, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent b9c6338 commit d4f5a09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,10 @@ static void mic_pre_enable(struct drm_bridge *bridge)
269269
goto unlock;
270270

271271
ret = pm_runtime_get_sync(mic->dev);
272-
if (ret < 0)
272+
if (ret < 0) {
273+
pm_runtime_put_noidle(mic->dev);
273274
goto unlock;
275+
}
274276

275277
mic_set_path(mic, 1);
276278

0 commit comments

Comments
 (0)