From 324cdf294d05c7f2e97827a7655084f7baa1365e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Tue, 20 Mar 2018 09:41:58 +0100 Subject: [PATCH] simple-dmabuf-drm: 0 is a valid fd (freedreno) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Eric Engestrom Signed-off-by: Guido Günther Reviewed-by: Pekka Paalanen --- 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 2975f3a..19e8dbb 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.7.4