]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
gpu: host1x: Fix a memory leak in 'host1x_remove()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 7 Nov 2021 21:16:36 +0000 (22:16 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:39:04 +0000 (14:39 +0200)
BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit 025c6643a81564f066d8381b9e2f4603e0f8438f ]

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: 8474b02531c4 ("gpu: host1x: Refactor channel allocation code")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c06577a80485511b894cb688e881ef0bc2d1d296)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/host1x/dev.c

index 3872e4cd26989d671ad813b159e22a0f631bb891..fc9f54282f7d6fe4f79226d1607610079a7f8e1d 100644 (file)
@@ -526,6 +526,7 @@ static int host1x_remove(struct platform_device *pdev)
        host1x_syncpt_deinit(host);
        reset_control_assert(host->rst);
        clk_disable_unprepare(host->clk);
+       host1x_channel_list_free(&host->channel_list);
        host1x_iommu_exit(host);
 
        return 0;