drm/i915/selftests: fix error handling in __live_lrc_indirect_ctx_bb()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 29 Apr 2020 13:24:25 +0000 (16:24 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 29 Apr 2020 14:16:35 +0000 (15:16 +0100)
commit8c35a195761107f314fce8e558699322027c3017
tree8d57a1aa7f2ad82867abea8a14dcd2d2c708a9a8
parent24aac336ff78eb55aedda043ed982c61dc3ac49a
drm/i915/selftests: fix error handling in __live_lrc_indirect_ctx_bb()

If intel_context_create() fails then it leads to an error pointer
dereference.  I shuffled things around to make error handling easier.

Fixes: 1dd47b54baea ("drm/i915: Add live selftests for indirect ctx batchbuffers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429132425.GE815283@mwanda
drivers/gpu/drm/i915/gt/selftest_lrc.c