From: Chris Wilson Date: Thu, 5 Jan 2017 15:30:20 +0000 (+0000) Subject: drm/i915: Assert that we do create the deferred context X-Git-Tag: v4.11-rc1~83^2~47^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56f6e0a7e7b09adb553339f9075696e918b96587;p=thirdparty%2Fkernel%2Flinux.git drm/i915: Assert that we do create the deferred context In order to convince static analyzers that the allocation function returns an error or sets ce->state, assert that it is set afterwards. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-2-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 2279788203204..51ecb395551b9 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -781,6 +781,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine, if (ret) goto err; } + GEM_BUG_ON(!ce->state); flags = PIN_GLOBAL; if (ctx->ggtt_offset_bias)