From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org,
linux+etnaviv@armlinux.org.uk
Cc: David Airlie <airlied@linux.ie>, Kangjie Lu <kjlu@umn.edu>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Stephen McCamant <mccamant@cs.umn.edu>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Navid Emamdoost <emamd001@umn.edu>, Qiushi Wu <wu000273@umn.edu>
Subject: Re: [PATCH v2] drm/etnaviv: fix ref count leak via pm_runtime_get_sync
Date: Mon, 15 Jun 2020 15:57:38 +0000 [thread overview]
Message-ID: <77698453-95ba-5e99-bba5-2ca4a4918026@web.de> (raw)
…
> In case of failure, decrement the ref count before returning.
Can it be nicer to use the term “reference count” here?
Will the tag “Fixes” become helpful for the commit message?
…
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
…
> @@ -1326,6 +1331,7 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)
> ret = event_alloc(gpu, nr_events, event);
> if (ret) {
> DRM_ERROR("no free events\n");
> + pm_runtime_put_noidle(gpu->dev);
> return NULL;
> }
I suggest to move a bit of exception handling code to the end of
this function implementation so that it can be better reused after
the addition of a jump target like “put_runtime”.
Regards,
Markus
reply other threads:[~2020-06-15 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=77698453-95ba-5e99-bba5-2ca4a4918026@web.de \
--to=markus.elfring@web.de \
--cc=airlied@linux.ie \
--cc=andy.shevchenko@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=etnaviv@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mccamant@cs.umn.edu \
--cc=navid.emamdoost@gmail.com \
--cc=wu000273@umn.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).