Skip to content

Commit

Permalink
drm: drm_fops.c unlock missing on error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed Mar 29, 2009
1 parent c972d75 commit dba5ed0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dba5ed0

Please sign in to comment.