aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_display.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 21:10:22 +0800
committerGerd Hoffmann <kraxel@redhat.com>2020-09-29 11:24:00 +0200
commit79b4d4d26bd256a0c7e3ce74c13a64797d98d1ac (patch)
tree07f181e2f9521e35c334603cc4d7ec5abcadaf63 /drivers/gpu/drm/qxl/qxl_display.c
parentdrm/virtio: advertise features to userspace (diff)
downloadlinux-dev-79b4d4d26bd256a0c7e3ce74c13a64797d98d1ac.tar.xz
linux-dev-79b4d4d26bd256a0c7e3ce74c13a64797d98d1ac.zip
drm/qxl: simplify the return expression of qxl_plane_prepare_fb()
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>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_display.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 6063f3a15329..65de1f69af58 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -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,