Mesa (master): i965: Change a ret == -1 check to ret != 0.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Nov 28 23:23:22 UTC 2017


Module: Mesa
Branch: master
Commit: 6b91610fc6082c449f67f1735f06db0e769c36b4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b91610fc6082c449f67f1735f06db0e769c36b4

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 28 08:12:45 2017 -0800

i965: Change a ret == -1 check to ret != 0.

For consistency with most other ret checks.  Suggested by Chris.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/mesa/drivers/dri/i965/brw_bufmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index bd46035c37..52b5bf97a1 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;




More information about the mesa-commit mailing list