Skip to content

Commit c0dd36b

Browse files
Wang Ligregkh
authored andcommitted
drm/mediatek: Fix PM reference leak in mtk_crtc_ddp_hw_init()
[ Upstream commit 69777e6 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wang Li <wangli74@huawei.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3393405 commit c0dd36b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/gpu/drm/mediatek/mtk_drm_crtc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
274274
drm_connector_list_iter_end(&conn_iter);
275275
}
276276

277-
ret = pm_runtime_get_sync(crtc->dev->dev);
277+
ret = pm_runtime_resume_and_get(crtc->dev->dev);
278278
if (ret < 0) {
279279
DRM_ERROR("Failed to enable power domain: %d\n", ret);
280280
return ret;

0 commit comments

Comments
 (0)