drm/i915/execlists: Onion unwind for logical_ring_init() failure
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Sep 2018 19:59:48 +0000 (20:59 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Sep 2018 20:49:30 +0000 (21:49 +0100)
commitb2164e48155607b8aa3c3004a03768cc30558d6e
tree61bde20e0424d6bd532ae51825811cadd7ea1fe1
parent8e1cb32d515bc6b691782104b00d9056a33127c8
drm/i915/execlists: Onion unwind for logical_ring_init() failure

Fix up the error unwind for logical_ring_init() failing by moving the
cleanup into the callers who own the various bits of state during
initialisation, so we don't forget to free the state allocated by the
caller.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180920195948.16448-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c