simple-dmabuf-drm: simplify fd_map_bo
authorGuido Günther <agx@sigxcpu.org>
Tue, 20 Mar 2018 08:41:59 +0000 (09:41 +0100)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 28 May 2018 12:24:15 +0000 (15:24 +0300)
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
clients/simple-dmabuf-drm.c

index 19e8dbb107ec9bea6ab72ddc342742772a8d9f7d..cb04622f78dad0339c4352748f5e25ce3be8012f 100644 (file)
@@ -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