public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/gvt: Set return value for ppgtt_populate error path
Date: Mon, 20 May 2019 10:51:24 +0800	[thread overview]
Message-ID: <20190520025124.GA12913@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <20190517102225.3069-1-chris@chris-wilson.co.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

On 2019.05.17 11:22:23 +0100, Chris Wilson wrote:
> Caught by smatch:
> drivers/gpu/drm/i915//gvt/gtt.c:1106 ppgtt_populate_spt_by_guest_entry() error: uninitialized symbol 'ret'.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/gtt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> index 08c74e65836b..244ad1729764 100644
> --- a/drivers/gpu/drm/i915/gvt/gtt.c
> +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> @@ -1076,8 +1076,10 @@ static struct intel_vgpu_ppgtt_spt *ppgtt_populate_spt_by_guest_entry(
>  	} else {
>  		int type = get_next_pt_type(we->type);
>  
> -		if (!gtt_type_is_pt(type))
> +		if (!gtt_type_is_pt(type)) {
> +			ret = -EINVAL;
>  			goto err;
> +		}
>  
>  		spt = ppgtt_alloc_spt_gfn(vgpu, type, ops->get_pfn(we), ips);
>  		if (IS_ERR(spt)) {
> -- 

I've already merged Dan's patch for this, I was out for some days of
last week, so haven't sent pull yet. Will include this in next pull.

Thanks

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

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

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2019-05-20  2:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 10:22 [PATCH 1/3] drm/i915/gvt: Set return value for ppgtt_populate error path Chris Wilson
2019-05-17 10:22 ` [PATCH 2/3] drm/i915/dp: Initialise locals for static analysis Chris Wilson
2019-05-17 12:09   ` Imre Deak
2019-05-17 10:22 ` [PATCH 3/3] drm/i915/hdcp: Use both bits for device_count Chris Wilson
2019-05-17 12:55   ` Ramalingam C
2019-05-17 12:46 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gvt: Set return value for ppgtt_populate error path Patchwork
2019-05-17 13:01 ` [PATCH 1/3] " Ramalingam C
2019-05-17 13:10   ` Ramalingam C
2019-05-17 13:39 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2019-05-17 19:38 ` ✓ Fi.CI.IGT: " Patchwork
2019-05-20  2:51 ` Zhenyu Wang [this message]

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=20190520025124.GA12913@zhen-hp.sh.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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