Message ID | 20220918220731.1026200-1-floridsleeves@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v1] drivers/gpu/drm/i915/gt: Check the return value of i915_active_acquire() | expand |
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c index b9640212d659..d8333ab64574 100644 --- a/drivers/gpu/drm/i915/gt/intel_timeline.c +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c @@ -211,7 +211,10 @@ int intel_timeline_pin(struct intel_timeline *tl, struct i915_gem_ww_ctx *ww) GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n", tl->fence_context, tl->hwsp_offset); - i915_active_acquire(&tl->active); + err = i915_active_acquire(&tl->active); + if (err) + return err; + if (atomic_fetch_inc(&tl->pin_count)) { i915_active_release(&tl->active); __i915_vma_unpin(tl->hwsp_ggtt);
i915_active_acquire() could return error when the acquire fails. Check and return the error code. Signed-off-by: Li Zhong <floridsleeves@gmail.com> --- drivers/gpu/drm/i915/gt/intel_timeline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)