drm/qxl: simplify the return expression of qxl_plane_prepare_fb()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:10:22 +0000 (21:10 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 29 Sep 2020 09:24:00 +0000 (11:24 +0200)
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200921131022.91649-1-miaoqinglang@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/qxl/qxl_display.c

index 6063f3a153290d4976e17259655d9cee556c3182..65de1f69af58fa5f04012453219b7fea0008c7be 100644 (file)
@@ -768,7 +768,6 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
        struct drm_gem_object *obj;
        struct qxl_bo *user_bo;
        struct qxl_surface surf;
-       int ret;
 
        if (!new_state->fb)
                return 0;
@@ -804,11 +803,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
                }
        }
 
-       ret = qxl_bo_pin(user_bo);
-       if (ret)
-               return ret;
-
-       return 0;
+       return qxl_bo_pin(user_bo);
 }
 
 static void qxl_plane_cleanup_fb(struct drm_plane *plane,