summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_bufs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 9be18595..eb478ba2 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -484,8 +484,10 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
return -EINVAL;
}
- if (!map)
+ if (!map) {
+ up(&dev->struct_sem);
return -EINVAL;
+ }
/* Register and framebuffer maps are permanent */
if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) {