Added a null check for the context pointer, before de-referencing it. Found by static analysis tool. Signed-off-by: Namrta Salonie <namrta.salonie@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 2f04e4f..29ecd0c 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1036,7 +1036,7 @@ static void i915_gem_record_rings(struct drm_device *dev, * for it to be useful (e.g. dump the context being * executed). */ - if (request) + if (request && request->ctx) rbuf = request->ctx->engine[ring->id].ringbuf; else rbuf = ring->default_context->engine[ring->id].ringbuf; -- 1.7.9.5 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx