Commit 6cff894e authored by Dan Carpenter's avatar Dan Carpenter Committed by Rodrigo Vivi

drm/i915: pin: delete duplicate check in intel_pin_and_fence_fb_obj()

The "ret" variable is checked on the previous line so we know it's
zero.  No need to check again.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211109114850.GB16587@kili
parent c68dac96
...@@ -142,14 +142,12 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb, ...@@ -142,14 +142,12 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
if (ret) if (ret)
goto err; goto err;
if (!ret) {
vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment,
view, pinctl); view, pinctl);
if (IS_ERR(vma)) { if (IS_ERR(vma)) {
ret = PTR_ERR(vma); ret = PTR_ERR(vma);
goto err_unpin; goto err_unpin;
} }
}
if (uses_fence && i915_vma_is_map_and_fenceable(vma)) { if (uses_fence && i915_vma_is_map_and_fenceable(vma)) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment