i965: Change a ret == -1 check to ret != 0.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 28 Nov 2017 16:12:45 +0000 (08:12 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 28 Nov 2017 23:23:16 +0000 (15:23 -0800)
For consistency with most other ret checks.  Suggested by Chris.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/brw_bufmgr.c

index bd46035c37c837f1395d8dba6e668946e075a376..52b5bf97a167df2fbb06fff2a946f7c627f100f1 100644 (file)
@@ -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;