diff mbox

[1/4] drm/tegra: dc: Free syncpoint on errors

Message ID 20180504133707.22451-1-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding May 4, 2018, 1:37 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

If an error happens during display controller initialization, the host1x
syncpoint previously requested would be leaked. Properly clean up the
syncpoint along with the other resources.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/dc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Dmitry Osipenko May 4, 2018, 2:14 p.m. UTC | #1
On 04.05.2018 16:37, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> If an error happens during display controller initialization, the host1x
> syncpoint previously requested would be leaked. Properly clean up the
> syncpoint along with the other resources.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/dc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index f20648f58e49..c843f11043db 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -1925,6 +1925,8 @@ static int tegra_dc_init(struct host1x_client *client)
>  		iommu_group_put(dc->group);
>  	}
>  
> +	host1x_syncpt_free(dc->syncpt);
> +
>  	return err;
>  }

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Thierry Reding May 4, 2018, 3:16 p.m. UTC | #2
On Fri, May 04, 2018 at 03:37:04PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> If an error happens during display controller initialization, the host1x
> syncpoint previously requested would be leaked. Properly clean up the
> syncpoint along with the other resources.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/dc.c | 2 ++
>  1 file changed, 2 insertions(+)

Patches 1-4 applied.

Thierry
diff mbox

Patch

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index f20648f58e49..c843f11043db 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1925,6 +1925,8 @@  static int tegra_dc_init(struct host1x_client *client)
 		iommu_group_put(dc->group);
 	}
 
+	host1x_syncpt_free(dc->syncpt);
+
 	return err;
 }