diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-11-09 14:48:50 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-11-09 17:59:27 -0500 |
commit | 6cff894e4991a5e80324ba39369288fad1e3ed1a (patch) | |
tree | 42dc42c85891b8dabbdd10312d5a2134bb371c8c /drivers/gpu/drm/i915 | |
parent | c68dac968c460b89a4f6e3617ee5defbcd96eead (diff) | |
download | linux-6cff894e4991a5e80324ba39369288fad1e3ed1a.tar.gz linux-6cff894e4991a5e80324ba39369288fad1e3ed1a.tar.bz2 linux-6cff894e4991a5e80324ba39369288fad1e3ed1a.zip |
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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211109114850.GB16587@kili
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb_pin.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c index 3f77f3013584..3b20f69e0240 100644 --- a/drivers/gpu/drm/i915/display/intel_fb_pin.c +++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c @@ -142,13 +142,11 @@ retry: if (ret) goto err; - if (!ret) { - vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, - view, pinctl); - if (IS_ERR(vma)) { - ret = PTR_ERR(vma); - goto err_unpin; - } + vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, + view, pinctl); + if (IS_ERR(vma)) { + ret = PTR_ERR(vma); + goto err_unpin; } if (uses_fence && i915_vma_is_map_and_fenceable(vma)) { |