summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r--libdrm/xf86drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 2f9d5c80..7001a0ef 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2865,7 +2865,7 @@ int drmBOVersion(int fd, unsigned int *major,
memset(&arg, 0, sizeof(arg));
ret = ioctl(fd, DRM_IOCTL_BO_VERSION, &arg);
if (ret)
- return ret;
+ return -errno;
if (major)
*major = arg.major;
@@ -2874,7 +2874,7 @@ int drmBOVersion(int fd, unsigned int *major,
if (patchlevel)
*patchlevel = arg.patchlevel;
- return (ret) ? -errno : 0;
+ return 0;
}