From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhenyu Wang 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 Message-ID: <20190520025124.GA12913@zhen-hp.sh.intel.com> References: <20190517102225.3069-1-chris@chris-wilson.co.uk> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1928326100==" Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 885F68919F for ; Mon, 20 May 2019 02:59:24 +0000 (UTC) In-Reply-To: <20190517102225.3069-1-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1928326100== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KldKAdupQSLqpq2E" Content-Disposition: inline --KldKAdupQSLqpq2E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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'. >=20 > Signed-off-by: Chris Wilson > Cc: Zhenyu Wang > --- > drivers/gpu/drm/i915/gvt/gtt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gt= t.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 =3D get_next_pt_type(we->type); > =20 > - if (!gtt_type_is_pt(type)) > + if (!gtt_type_is_pt(type)) { > + ret =3D -EINVAL; > goto err; > + } > =20 > spt =3D ppgtt_alloc_spt_gfn(vgpu, type, ops->get_pfn(we), ips); > if (IS_ERR(spt)) { > --=20 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 --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --KldKAdupQSLqpq2E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCXOIWLAAKCRCxBBozTXgY J8BuAJ9KUqTRn4tL5+Avs7eQ1rNhBRoYuwCeI6/R0OX98gmAHp23waN9q6iBwFs= =x5+0 -----END PGP SIGNATURE----- --KldKAdupQSLqpq2E-- --===============1928326100== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 --===============1928326100==--