Skip to content

Commit a937eaf

Browse files
committed
drm/i915: Fix uninitialized return from mi_set_context
For some reason my compiler (and CI as well) failed to spot the uninitialized ret in mi_set_context. Signed-off-by: Tvrtko Ursulin <[email protected]> Fixes: 73dec95 ("drm/i915: Emit to ringbuffer directly") Cc: Tvrtko Ursulin <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 73dec95 commit a937eaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/i915/i915_gem_context.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,15 +604,15 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags)
604604
i915.semaphores ?
605605
INTEL_INFO(dev_priv)->num_rings - 1 :
606606
0;
607-
int len, ret;
607+
int len;
608608

609609
/* w/a: If Flush TLB Invalidation Mode is enabled, driver must do a TLB
610610
* invalidation prior to MI_SET_CONTEXT. On GEN6 we don't set the value
611611
* explicitly, so we rely on the value at ring init, stored in
612612
* itlb_before_ctx_switch.
613613
*/
614614
if (IS_GEN6(dev_priv)) {
615-
ret = engine->emit_flush(req, EMIT_INVALIDATE);
615+
int ret = engine->emit_flush(req, EMIT_INVALIDATE);
616616
if (ret)
617617
return ret;
618618
}
@@ -687,7 +687,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags)
687687

688688
intel_ring_advance(req, cs);
689689

690-
return ret;
690+
return 0;
691691
}
692692

693693
static int remap_l3(struct drm_i915_gem_request *req, int slice)

0 commit comments

Comments
 (0)