提交 5a5a676a 编写于 作者: C Christophe JAILLET 提交者: Zheng Zengkai

gpu: host1x: Fix a memory leak in 'host1x_remove()'

stable inclusion
from stable-v5.10.110
commit 6bb107332db28a0e9256c2d36a0902b85307612c
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6bb107332db28a0e9256c2d36a0902b85307612c

--------------------------------

[ Upstream commit 025c6643 ]

Add a missing 'host1x_channel_list_free()' call in the remove function,
as already done in the error handling path of the probe function.

Fixes: 8474b025 ("gpu: host1x: Refactor channel allocation code")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 828705bc
...@@ -520,6 +520,7 @@ static int host1x_remove(struct platform_device *pdev) ...@@ -520,6 +520,7 @@ static int host1x_remove(struct platform_device *pdev)
host1x_syncpt_deinit(host); host1x_syncpt_deinit(host);
reset_control_assert(host->rst); reset_control_assert(host->rst);
clk_disable_unprepare(host->clk); clk_disable_unprepare(host->clk);
host1x_channel_list_free(&host->channel_list);
host1x_iommu_exit(host); host1x_iommu_exit(host);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册