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

Guido Günther agx at sigxcpu.org
Mon Mar 19 16:45:20 UTC 2018


Signed-off-by: Guido Günther <agx at sigxcpu.org>
---
 clients/simple-dmabuf-drm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c
index a184d7e7..22891639 100644
--- a/clients/simple-dmabuf-drm.c
+++ b/clients/simple-dmabuf-drm.c
@@ -244,10 +244,10 @@ 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;
+	if (buf->dmabuf_fd < 0)
+		return 1;
 
-	return 1;
+	return 0;
 }
 
 static int
-- 
2.16.1



More information about the wayland-devel mailing list