summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2022-03-16 15:34:52 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-03-18 08:04:32 +0300
commit77119adb62dda4918cb21755775d3cacd3e83097 (patch)
tree4e0250beb10a5d69cbf864a9030a642d78b6ac6a /drivers/media
parentf4a4f9a54b2c52b0c6f40d0f37a129e9909fa62d (diff)
downloadlinux-77119adb62dda4918cb21755775d3cacd3e83097.tar.xz
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.com Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
index 8d2a641d92f1..60da59611434 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
@@ -47,6 +47,8 @@ static int mtk_vdec_hw_prob_done(struct mtk_vcodec_dev *vdec_dev)
if (!subdev_node)
continue;
+ of_node_put(subdev_node);
+
hw_idx = (enum mtk_vdec_hw_id)(uintptr_t)of_id->data;
if (!test_bit(hw_idx, vdec_dev->subdev_bitmap)) {
dev_err(&pdev->dev, "vdec %d is not ready", hw_idx);