From: Ramalingam C <ramalingam.c@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: Fri, 17 May 2019 18:31:42 +0530 [thread overview]
Message-ID: <20190517130142.GB4714@intel.com> (raw)
In-Reply-To: <20190517102225.3069-1-chris@chris-wilson.co.uk>
On 2019-05-17 at 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;
> + }
ret will be still uninitialized if we pass
if (spt) {
and not pass
if (ips != spt->guest_page.pde_ips) {
-Ram
>
> spt = ppgtt_alloc_spt_gfn(vgpu, type, ops->get_pfn(we), ips);
> if (IS_ERR(spt)) {
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-05-17 12: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 ` Ramalingam C [this message]
2019-05-17 13:10 ` [PATCH 1/3] " 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 ` [PATCH 1/3] " Zhenyu Wang
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=20190517130142.GB4714@intel.com \
--to=ramalingam.c@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.