aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2020-09-05 16:30:58 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 12:59:57 +0200
commit9a904d3afc880e682bde7362fe7872917a45cd62 (patch)
tree395a34fa93afe9b043e1194f40ebb3dac5d57369
parentaa0157adb1c538e77af8f5c17766abf6c4d671c6 (diff)
drm/mediatek: Add missing put_device() call in mtk_ddp_comp_init()
[ Upstream commit d494c257271153633a05c11e6dec85ddfc7700ee ] 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: d0afe37f5209 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index 57c88de9a329..526648885b97 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -496,6 +496,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
if (of_address_to_resource(node, 0, &res) != 0) {
dev_err(dev, "Missing reg in %s node\n", node->full_name);
+ put_device(&larb_pdev->dev);
return -EINVAL;
}
comp->regs_pa = res.start;