summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_cmd.c
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-06-03 12:09:13 +0100
committerDave Airlie <airlied@redhat.com>2015-06-05 11:00:49 +1000
commitc610c7137c02eb9812b4e7871abe5b0642ff58d2 (patch)
tree90b17665fe83c496efe988bcafe6cfd07bfe723e /drivers/gpu/drm/qxl/qxl_cmd.c
parentfe2af53baec1b3b64ee343d4e7e6a351e52e3b48 (diff)
drm/qxl: Handle all errors in qxl_surface_evict
Only EBUSY error was handled. This could cause code to believe reserve was successful while it failed. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_cmd.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index f33251d67914..3d270a4f4fd7 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -618,8 +618,8 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
int ret;
ret = qxl_bo_reserve(surf, false);
- if (ret == -EBUSY)
- return -EBUSY;
+ if (ret)
+ return ret;
if (stall)
mutex_unlock(&qdev->surf_evict_mutex);
@@ -628,9 +628,9 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
if (stall)
mutex_lock(&qdev->surf_evict_mutex);
- if (ret == -EBUSY) {
+ if (ret) {
qxl_bo_unreserve(surf);
- return -EBUSY;
+ return ret;
}
qxl_surface_evict_locked(qdev, surf, true);