[PATCH weston v5 1/3] simple-dmabuf-drm: 0 is a valid fd (freedreno)

Guido Günther agx at sigxcpu.org
Tue Mar 20 08:41:58 UTC 2018


Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Signed-off-by: Guido Günther <agx at sigxcpu.org>
---
 clients/simple-dmabuf-drm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c
index 2975f3a5..19e8dbb1 100644
--- a/clients/simple-dmabuf-drm.c
+++ b/clients/simple-dmabuf-drm.c
@@ -244,10 +244,7 @@ static int
 fd_bo_export_to_prime(struct buffer *buf)
 {
 	buf->dmabuf_fd = fd_bo_dmabuf(buf->fd_bo);
-	if (buf->dmabuf_fd > 0)
-		return 0;
-
-	return 1;
+	return buf->dmabuf_fd < 0;
 }
 
 static int
-- 
2.16.1



More information about the wayland-devel mailing list