Skip to content
/ linux Public

Commit c44beed

Browse files
Haoxiang LiSasha Levin
authored andcommitted
media: mtk-mdp: Fix a reference leak bug in mtk_mdp_remove()
[ Upstream commit f128bab ] In mtk_mdp_probe(), vpu_get_plat_device() increases the reference count of the returned platform device. Add platform_device_put() to prevent reference leak. Fixes: c8eb2d7 ("[media] media: Add Mediatek MDP Driver") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9d7962d commit c44beed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/media/platform/mediatek/mdp/mtk_mdp_core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ static int mtk_mdp_remove(struct platform_device *pdev)
254254

255255
pm_runtime_disable(&pdev->dev);
256256
vb2_dma_contig_clear_max_seg_size(&pdev->dev);
257+
platform_device_put(mdp->vpu_dev);
257258
mtk_mdp_unregister_m2m_device(mdp);
258259
v4l2_device_unregister(&mdp->v4l2_dev);
259260

0 commit comments

Comments
 (0)