All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/tegra: gr2d: Properly clean up resources
Date: Mon, 7 May 2018 23:57:35 +0300	[thread overview]
Message-ID: <e8ec9684-43f1-81cb-614b-76f1d756d9c0@gmail.com> (raw)
In-Reply-To: <20180504133707.22451-2-thierry.reding@gmail.com>

On 04.05.2018 16:37, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Failure to register the Tegra DRM client would leak the resources. Move
> cleanup code to error unwinding gotos to fix that and share the cleanup
> code with the other error paths.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/gr2d.c | 28 ++++++++++++++++++++++------
>  1 file changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
> index 8eb530a85dd0..0b42e99da8ad 100644
> --- a/drivers/gpu/drm/tegra/gr2d.c
> +++ b/drivers/gpu/drm/tegra/gr2d.c
> @@ -42,8 +42,9 @@ static int gr2d_init(struct host1x_client *client)
>  
>  	client->syncpts[0] = host1x_syncpt_request(client, flags);
>  	if (!client->syncpts[0]) {
> -		host1x_channel_put(gr2d->channel);
> -		return -ENOMEM;
> +		err = -ENOMEM;
> +		dev_err(client->dev, "failed to request syncpoint: %d\n", err);

Nit: You could add the same error message to the gr3d patch for consistency.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-05-07 20:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 13:37 [PATCH 1/4] drm/tegra: dc: Free syncpoint on errors Thierry Reding
2018-05-04 13:37 ` [PATCH 2/4] drm/tegra: gr2d: Properly clean up resources Thierry Reding
2018-05-04 14:16   ` Dmitry Osipenko
2018-05-07 20:57   ` Dmitry Osipenko [this message]
2018-05-04 13:37 ` [PATCH 3/4] drm/tegra: gr3d: " Thierry Reding
2018-05-04 14:16   ` Dmitry Osipenko
2018-05-04 13:37 ` [PATCH 4/4] drm/tegra: Refactor IOMMU attach/detach Thierry Reding
2018-05-04 14:23   ` Dmitry Osipenko
2018-05-04 15:10     ` Thierry Reding
2018-05-04 15:17       ` Dmitry Osipenko
2018-05-04 15:25         ` Thierry Reding
2018-05-10 23:42   ` Dmitry Osipenko
2018-05-04 14:14 ` [PATCH 1/4] drm/tegra: dc: Free syncpoint on errors Dmitry Osipenko
2018-05-04 15:16 ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8ec9684-43f1-81cb-614b-76f1d756d9c0@gmail.com \
    --to=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.