public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915/gvt: Set return value for ppgtt_populate error path
@ 2019-05-17 10:22 Chris Wilson
  2019-05-17 10:22 ` [PATCH 2/3] drm/i915/dp: Initialise locals for static analysis Chris Wilson
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Chris Wilson @ 2019-05-17 10:22 UTC (permalink / raw)
  To: intel-gfx

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)) {
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-05-20  2:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/3] " Zhenyu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox