summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-03-20 09:41:59 +0100
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2018-05-28 15:24:15 +0300
commitf9f5953b2defb9e51f0a97a96e57fb10d829b6bd (patch)
tree2a20d60d1f9de4f9787c46bcf670b436743839b5
parent324cdf294d05c7f2e97827a7655084f7baa1365e (diff)
downloadweston-f9f5953b2defb9e51f0a97a96e57fb10d829b6bd.tar.gz
weston-f9f5953b2defb9e51f0a97a96e57fb10d829b6bd.tar.bz2
weston-f9f5953b2defb9e51f0a97a96e57fb10d829b6bd.zip
simple-dmabuf-drm: simplify fd_map_bo
Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--clients/simple-dmabuf-drm.c6
1 files changed, 1 insertions, 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