From: Kenneth Graunke Date: Tue, 30 Jan 2018 20:30:34 +0000 (-0800) Subject: iris: fix dmabuf retval comparisons X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ade381fb9c5985a574c812856fc6effed3c624f5;p=mesa.git iris: fix dmabuf retval comparisons 0 means success --- 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;