On Thu, Nov 11, 2021 at 12:14:52PM +0800, Yunfei Dong wrote:
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
[...]
+void *mtk_vcodec_get_hw_dev(struct mtk_vcodec_dev *dev, int hw_idx) {
[...]
- if (dev->subdev_dev[hw_idx])
return dev->subdev_dev[hw_idx];
- node = dev->subdev_node[hw_idx];
- if (!node) {
mtk_v4l2_err("Get lat node fail:%d", hw_idx);
return NULL;
- }
- hw_pdev = of_find_device_by_node(node);
- of_node_put(node);
Raised the question in [v10,06/19] media: mtk-vcodec: Manage multi hardware information[1], is the reference count borrowed from mtk_vcodec_subdev_device_check? If so, it needs comments for documentation.
[1]: https://patchwork.linuxtv.org/project/linux-media/patch/20211111041500.17363...