diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index b6b007e2ff2c..878d331b9e8c 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -15803,7 +15803,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane, false, I915_FENCE_TIMEOUT, GFP_KERNEL); if (ret < 0) - return ret; + goto unpin_fb; fence = dma_resv_get_excl_rcu(obj->base.resv); if (fence) { @@ -15830,6 +15830,11 @@ intel_prepare_plane_fb(struct drm_plane *_plane, } return 0; + +unpin_fb: + intel_plane_unpin_fb(new_plane_state); + + return ret; } /**