summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-11-07 22:16:36 +0100
committerThierry Reding <treding@nvidia.com>2022-03-01 11:13:09 +0100
commit025c6643a81564f066d8381b9e2f4603e0f8438f (patch)
treea9b42e8f22d1d77715b9ddec2582d542f76d47d2 /drivers/gpu/host1x
parentgpu: host1x: Fix an error handling path in 'host1x_probe()' (diff)
downloadlinux-025c6643a81564f066d8381b9e2f4603e0f8438f.tar.xz
linux-025c6643a81564f066d8381b9e2f4603e0f8438f.zip
gpu: host1x: Fix a memory leak in 'host1x_remove()'
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>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/dev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 9605495f001a..80c685ab3e30 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -571,6 +571,7 @@ static int host1x_remove(struct platform_device *pdev)
host1x_intr_deinit(host);
host1x_syncpt_deinit(host);
+ host1x_channel_list_free(&host->channel_list);
host1x_iommu_exit(host);
host1x_bo_cache_destroy(&host->cache);