From ade381fb9c5985a574c812856fc6effed3c624f5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 30 Jan 2018 12:30:34 -0800 Subject: [PATCH] iris: fix dmabuf retval comparisons 0 means success --- src/gallium/drivers/iris/iris_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index be75de2402c..2d314ce5e75 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -355,11 +355,11 @@ iris_resource_get_handle(struct pipe_screen *pscreen, switch (whandle->type) { case WINSYS_HANDLE_TYPE_SHARED: - return iris_bo_flink(res->bo, &whandle->handle) > 0; + return iris_bo_flink(res->bo, &whandle->handle) == 0; case WINSYS_HANDLE_TYPE_KMS: - return iris_bo_export_gem_handle(res->bo); + return iris_bo_export_gem_handle(res->bo) == 0; case WINSYS_HANDLE_TYPE_FD: - return iris_bo_export_dmabuf(res->bo, (int *) &whandle->handle) > 0; + return iris_bo_export_dmabuf(res->bo, (int *) &whandle->handle) == 0; } return false; -- 2.30.2