Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit dba5ed0c authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c972d750
Branches
No related tags found
No related merge requests found
...@@ -274,6 +274,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, ...@@ -274,6 +274,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
/* create a new master */ /* create a new master */
priv->minor->master = drm_master_create(priv->minor); priv->minor->master = drm_master_create(priv->minor);
if (!priv->minor->master) { if (!priv->minor->master) {
mutex_unlock(&dev->struct_mutex);
ret = -ENOMEM; ret = -ENOMEM;
goto out_free; goto out_free;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment