Commit d494c257 authored by Yu Kuai's avatar Yu Kuai Committed by Chun-Kuang Hu

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: d0afe37f ("drm/mediatek: support CMDQ interface in ddp component")
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
parent f85acdad
...@@ -496,6 +496,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node, ...@@ -496,6 +496,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
#if IS_REACHABLE(CONFIG_MTK_CMDQ) #if IS_REACHABLE(CONFIG_MTK_CMDQ)
if (of_address_to_resource(node, 0, &res) != 0) { if (of_address_to_resource(node, 0, &res) != 0) {
dev_err(dev, "Missing reg in %s node\n", node->full_name); dev_err(dev, "Missing reg in %s node\n", node->full_name);
put_device(&larb_pdev->dev);
return -EINVAL; return -EINVAL;
} }
comp->regs_pa = res.start; comp->regs_pa = res.start;
......
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