Skip to content

Commit d494c25

Browse files
YuKuai-huaweiChun-Kuang Hu
authored andcommitted
drm/mediatek: Add missing put_device() call in mtk_ddp_comp_init()
if of_find_device_by_node() succeed, mtk_ddp_comp_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: d0afe37 ("drm/mediatek: support CMDQ interface in ddp component") Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
1 parent f85acda commit d494c25

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
496496
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
497497
if (of_address_to_resource(node, 0, &res) != 0) {
498498
dev_err(dev, "Missing reg in %s node\n", node->full_name);
499+
put_device(&larb_pdev->dev);
499500
return -EINVAL;
500501
}
501502
comp->regs_pa = res.start;

0 commit comments

Comments
 (0)