drm/i915: fix an error code in intel_overlay_do_put_image()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Apr 2021 06:02:24 +0000 (09:02 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 26 Apr 2021 08:54:27 +0000 (11:54 +0300)
This code should propagate the error from intel_overlay_pin_fb()
but currently it returns success.

Fixes: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane")
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/YHaFcEzcnh/hk1/Q@mwanda
(cherry picked from commit 103b8cbac28ea2965f24ca52e6a92d76d3851b3c)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_overlay.c

index e477b6114a60857b275eee93d13f1b2f987a8667..e5dadde422f74eb04b35859a491284a3ccea3b1a 100644 (file)
@@ -803,8 +803,10 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
        atomic_inc(&dev_priv->gpu_error.pending_fb_pin);
 
        vma = intel_overlay_pin_fb(new_bo);
-       if (IS_ERR(vma))
+       if (IS_ERR(vma)) {
+               ret = PTR_ERR(vma);
                goto out_pin_section;
+       }
 
        i915_gem_object_flush_frontbuffer(new_bo, ORIGIN_DIRTYFB);