drm/i915/guc: Don't leak stage descriptor pool on init failure
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 5 Jun 2018 12:05:47 +0000 (12:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jun 2018 18:21:51 +0000 (19:21 +0100)
commit70be8b3dab43497718a2260f1daf47d378815d90
tree38f215b5b12797524b972b8e6b3fc067a22131b7
parent9f473ecfe7a8520de359ed20bf95a1628e85e650
drm/i915/guc: Don't leak stage descriptor pool on init failure

In case of failure during GuC clients creation, we forget to
cleanup earlier pool allocation. Use proper teardown to fix that.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180605120547.16468-1-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/intel_guc_submission.c