From f9f5953b2defb9e51f0a97a96e57fb10d829b6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Tue, 20 Mar 2018 09:41:59 +0100 Subject: [PATCH] simple-dmabuf-drm: simplify fd_map_bo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guido Günther Reviewed-by: Pekka Paalanen --- clients/simple-dmabuf-drm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c index 19e8dbb1..cb04622f 100644 --- a/clients/simple-dmabuf-drm.c +++ b/clients/simple-dmabuf-drm.c @@ -251,11 +251,7 @@ static int fd_map_bo(struct buffer *buf) { buf->mmap = fd_bo_map(buf->fd_bo); - - if (buf->mmap != NULL) - return 1; - - return 0; + return buf->mmap != NULL; } static void