From: Dan Carpenter Date: Fri, 27 Mar 2009 10:34:28 +0000 (+0300) Subject: drm: drm_fops.c unlock missing on error path X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dba5ed0cd12d8db5c0d2e1c869c2a50c5bcf6743;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index e13cb62bbae..09a3571c990 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/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; }