Explorar o código

drm: missing mutex unlock

Signed-off-by: Dave Airlie <airlied@linux.ie>
Thomas Hellstrom %!s(int64=19) %!d(string=hai) anos
pai
achega
7a3f1f216b
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      drivers/char/drm/drm_bufs.c

+ 3 - 1
drivers/char/drm/drm_bufs.c

@@ -441,8 +441,10 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
 		return -EINVAL;
 	}
 
-	if (!map)
+	if (!map) {
+		mutex_unlock(&dev->struct_mutex);
 		return -EINVAL;
+	}
 
 	/* Register and framebuffer maps are permanent */
 	if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) {