Commit 77119adb authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Mauro Carvalho Chehab

media: mtk-vcodec: Add missing of_node_put() in mtk_vdec_hw_prob_done()

of_find_compatible_node() will increment the refcount of the returned
device_node. Calling of_node_put() to avoid the refcount leak.

Link: https://lore.kernel.org/linux-media/20220316123452.186166-1-wangxiongfeng2@huawei.comSigned-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f4a4f9a5
...@@ -47,6 +47,8 @@ static int mtk_vdec_hw_prob_done(struct mtk_vcodec_dev *vdec_dev) ...@@ -47,6 +47,8 @@ static int mtk_vdec_hw_prob_done(struct mtk_vcodec_dev *vdec_dev)
if (!subdev_node) if (!subdev_node)
continue; continue;
of_node_put(subdev_node);
hw_idx = (enum mtk_vdec_hw_id)(uintptr_t)of_id->data; hw_idx = (enum mtk_vdec_hw_id)(uintptr_t)of_id->data;
if (!test_bit(hw_idx, vdec_dev->subdev_bitmap)) { if (!test_bit(hw_idx, vdec_dev->subdev_bitmap)) {
dev_err(&pdev->dev, "vdec %d is not ready", hw_idx); dev_err(&pdev->dev, "vdec %d is not ready", hw_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment