From: Kenneth Graunke Date: Tue, 28 Nov 2017 16:12:45 +0000 (-0800) Subject: i965: Change a ret == -1 check to ret != 0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b91610fc6082c449f67f1735f06db0e769c36b4;p=mesa.git i965: Change a ret == -1 check to ret != 0. For consistency with most other ret checks. Suggested by Chris. Reviewed-by: Chris Wilson --- diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index bd46035c37c..52b5bf97a16 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c @@ -1035,7 +1035,7 @@ brw_bo_wait(struct brw_bo *bo, int64_t timeout_ns) .timeout_ns = timeout_ns, }; int ret = drmIoctl(bufmgr->fd, DRM_IOCTL_I915_GEM_WAIT, &wait); - if (ret == -1) + if (ret != 0) return -errno; bo->idle = true;