summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2018-03-20 14:44:03 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2018-03-20 14:44:09 +0900
commit42364e09ebc5df3bdd40cd3ea11e3bfebd5ca828 (patch)
tree2153a9e234f43650d090fa463b0a67d96343884d
parent4653591a96b4265a5c06e74afeaa23bf04d8b56f (diff)
downloadlibdrm-42364e09ebc5df3bdd40cd3ea11e3bfebd5ca828.tar.gz
libdrm-42364e09ebc5df3bdd40cd3ea11e3bfebd5ca828.tar.bz2
libdrm-42364e09ebc5df3bdd40cd3ea11e3bfebd5ca828.zip
VIGS: fix always to check return of drmIoctl()
Fix to check return value of drmIoctl(). Change-Id: I0aae8953ebcb0b2b580638c1c730e2a4833df9f2 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--vigs/vigs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/vigs/vigs.c b/vigs/vigs.c
index 4fdc598b..6cbe996f 100644
--- a/vigs/vigs.c
+++ b/vigs/vigs.c
@@ -87,9 +87,13 @@ static void vigs_drm_gem_close(struct vigs_drm_device *dev, uint32_t handle)
{
.handle = handle,
};
+ int ret;
if (handle) {
- drmIoctl(dev->fd, DRM_IOCTL_GEM_CLOSE, &req);
+ ret = drmIoctl(dev->fd, DRM_IOCTL_GEM_CLOSE, &req);
+ if (ret) {
+ fprintf(stderr, "DRM_IOCTL_GEM_CLOSE %d failed(%d)\n", handle, ret);
+ }
}
}
@@ -625,6 +629,7 @@ void vigs_drm_fence_unref(struct vigs_drm_fence *fence)
{
struct vigs_drm_fence_impl *fence_impl;
struct drm_vigs_fence_unref req;
+ int ret;
if (!fence) {
return;
@@ -639,7 +644,9 @@ void vigs_drm_fence_unref(struct vigs_drm_fence *fence)
req.handle = fence->handle;
- drmIoctl(fence->dev->fd, DRM_IOCTL_VIGS_FENCE_UNREF, &req);
+ ret = drmIoctl(fence->dev->fd, DRM_IOCTL_VIGS_FENCE_UNREF, &req);
+ if (ret)
+ fprintf(stderr, "DRM_IOCTL_VIGS_FENCE_UNREF failed(%d)\n", ret);
free(fence_impl);
}