From 5b47de6bdfe39fe7df684118b8a60870fcfcb49b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 22 Mar 2020 12:32:41 +0000 Subject: [PATCH] drm/i915/gt: Use the correct err_unlock unwind path for a closed context A silly cut'n'paste copied the unlocked error path and used it inside the pin_mutex lock, we need to drop that lock before returning. Fixes: de570ce042f2 ("drm/i915/gt: Report context-is-closed prior to pinning") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200322123241.17694-1-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt/intel_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c index 7132bf616cc49..e4aece20bc808 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.c +++ b/drivers/gpu/drm/i915/gt/intel_context.c @@ -114,7 +114,7 @@ int __intel_context_do_pin(struct intel_context *ce) if (unlikely(intel_context_is_closed(ce))) { err = -ENOENT; - goto out_release; + goto out_unlock; } if (likely(!atomic_add_unless(&ce->pin_count, 1, 0))) { -- 2.39.5