Explorar o código

drm: drm_fops.c unlock missing on error path

drm_open_helper() from drm_fops.c had a missing mutex_unlock in a error
path.

This was caught by smatch (http://repo.or.cz/w/smatch.git/).  Compile
tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dan Carpenter %!s(int64=16) %!d(string=hai) anos
pai
achega
dba5ed0cd1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/gpu/drm/drm_fops.c

+ 1 - 0
drivers/gpu/drm/drm_fops.c

@@ -274,6 +274,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
 		/* create a new master */
 		priv->minor->master = drm_master_create(priv->minor);
 		if (!priv->minor->master) {
+			mutex_unlock(&dev->struct_mutex);
 			ret = -ENOMEM;
 			goto out_free;
 		}