From: Mukesh Ojha <mojha@codeaurora.org>
To: Kangjie Lu <kjlu@umn.edu>
Cc: David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
pakki001@umn.edu
Subject: Re: [PATCH] gpu: v3d: fix a missing check of pm_runtime_get_sync
Date: Mon, 25 Mar 2019 12:11:59 +0530 [thread overview]
Message-ID: <d0553815-d3ba-a999-55b6-9e2f7801dd7e@codeaurora.org> (raw)
In-Reply-To: <20190324231602.2436-1-kjlu@umn.edu>
[-- Attachment #1.1: Type: text/plain, Size: 975 bytes --]
On 3/25/2019 4:46 AM, Kangjie Lu wrote:
> pm_runtime_get_sync could fail and thus deserves a check.
>
> The patch adds such a check and return its error code upstream
> if it indeed failed.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org
<mailto:mojha@codeaurora.org>>
Thanks.
Mukesh
> ---
> drivers/gpu/drm/v3d/v3d_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> index f0afcec72c34..99daad11fac2 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.c
> +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> @@ -101,6 +101,8 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
> return -EINVAL;
>
> ret = pm_runtime_get_sync(v3d->dev);
> + if (ret < 0)
> + return ret;
> if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 &&
> args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) {
> args->value = V3D_CORE_READ(0, offset);
[-- Attachment #1.2: Type: text/html, Size: 1685 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-25 6:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 23:16 [PATCH] gpu: v3d: fix a missing check of pm_runtime_get_sync Kangjie Lu
2019-03-25 6:41 ` Mukesh Ojha [this message]
2019-03-27 15:09 ` Mukesh Ojha
2019-04-01 17:49 ` Eric Anholt
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=d0553815-d3ba-a999-55b6-9e2f7801dd7e@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pakki001@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