Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	intel-gvt-dev@lists.freedesktop.org,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist()
Date: Mon, 11 Jul 2022 10:58:08 +0800	[thread overview]
Message-ID: <20220711025808.GQ1089@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <01c7440e-8198-878c-cfb6-b54468b1dca5@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

On 2022.07.08 10:55:52 +0200, Andrzej Hajda wrote:
> On 08.07.2022 10:41, Dan Carpenter wrote:
> > The shmem_pin_map() function returns NULL, it doesn't return error
> > pointers.
> > 
> > Fixes: 97ea656521c8 ("drm/i915/gvt: Parse default state to update reg whitelist")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
> 

Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>

Thanks! Will push to -fixes.

> 
> > ---
> >   drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> > index b9eb75a2b400..1c35a41620ae 100644
> > --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> > +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> > @@ -3117,9 +3117,9 @@ void intel_gvt_update_reg_whitelist(struct intel_vgpu *vgpu)
> >   			continue;
> >   		vaddr = shmem_pin_map(engine->default_state);
> > -		if (IS_ERR(vaddr)) {
> > -			gvt_err("failed to map %s->default state, err:%zd\n",
> > -				engine->name, PTR_ERR(vaddr));
> > +		if (!vaddr) {
> > +			gvt_err("failed to map %s->default state\n",
> > +				engine->name);
> >   			return;
> >   		}
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2022-07-11  3:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08  8:41 [Intel-gfx] [PATCH] drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist() Dan Carpenter
2022-07-08  8:55 ` Andrzej Hajda
2022-07-11  2:58   ` Zhenyu Wang [this message]
2022-07-08 10:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-07-08 15:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist() (rev2) Patchwork
2022-07-09  2:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20220711025808.GQ1089@zhen-hp.sh.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=rodrigo.vivi@intel.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