From: Steven Price <steven.price@arm.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm/panfrost: Only put sync_out if non-NULL
Date: Thu, 9 May 2019 17:22:54 +0100 [thread overview]
Message-ID: <963a53ae-5a70-3ba3-c910-889e70304032@arm.com> (raw)
In-Reply-To: <20190509082151.8823-1-tomeu.vizoso@collabora.com>
On 09/05/2019 09:21, Tomeu Vizoso wrote:
> Dan Carpenter's static analysis tool reported:
>
> drivers/gpu/drm/panfrost/panfrost_drv.c:222 panfrost_ioctl_submit()
> error: we previously assumed 'sync_out' could be null (see line 216)
>
> Indeed, sync_out could be NULL if userspace doesn't send a sync object
> ID for the out fence.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Link: https://lists.freedesktop.org/archives/dri-devel/2019-May/217014.html
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 94b0819ad50b..d11e2281dde6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -219,7 +219,8 @@ static int panfrost_ioctl_submit(struct drm_device *dev, void *data,
> fail_job:
> panfrost_job_put(job);
> fail_out_sync:
> - drm_syncobj_put(sync_out);
> + if (sync_out)
> + drm_syncobj_put(sync_out);
>
> return ret;
> }
>
next prev parent reply other threads:[~2019-05-09 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190507080405.GA9436@mwanda>
2019-05-09 8:21 ` Tomeu Vizoso
2019-05-09 16:22 ` Steven Price [this message]
2019-05-13 14:56 ` Rob Herring
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=963a53ae-5a70-3ba3-c910-889e70304032@arm.com \
--to=steven.price@arm.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomeu.vizoso@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®