aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-08-16 18:01:52 +0100
committerThomas White <taw@bitwiz.org.uk>2009-08-16 18:01:52 +0100
commite756ff971fe4ca31ea320f8602bfe827e502c670 (patch)
treeda9dc626b59946c3563906aee5d9cd365a2adb27 /drivers
parent044e1f3c5a6f4b3e9cafc1a356c1c084b9e6993b (diff)
Unlock mutex on unsuccessful mmap
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/glamo/glamo-buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/glamo/glamo-buffer.c b/drivers/mfd/glamo/glamo-buffer.c
index 815495e1d7f..abf867530aa 100644
--- a/drivers/mfd/glamo/glamo-buffer.c
+++ b/drivers/mfd/glamo/glamo-buffer.c
@@ -230,8 +230,10 @@ int glamo_ioctl_gem_mmap(struct drm_device *dev, void *data,
gobj = obj->driver_private;
if (!gobj->mmap_offset) {
ret = glamo_gem_create_mmap_offset(obj);
- if (ret)
+ if (ret) {
+ mutex_unlock(&dev->struct_mutex);
return ret;
+ }
}
args->offset = gobj->mmap_offset;