aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2011-08-30 16:41:14 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 19:49:27 -0400
commit303dfbf5727410bfa3e82d4e2554813f1e8f2de6 (patch)
tree4672a8a3de6a8178efa8909da55c215c492b83ea /drivers
parent17966e3bb8a3a0d883f4893e515c174ac5980413 (diff)
staging: mei: unlock dev->device_lock mutex on error path in mei_open()
mei_open() acquires dev->device_lock mutex and try to allocate mei_cl, but if the allocation fails it goes to return statement. As a result dev->device_lock left locked. The patch fixes goto to unlock dev->device_lock mutex on this path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/mei/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/mei/main.c b/drivers/staging/mei/main.c
index 8d7678569e7..78028f8c0b8 100644
--- a/drivers/staging/mei/main.c
+++ b/drivers/staging/mei/main.c
@@ -413,7 +413,7 @@ static int mei_open(struct inode *inode, struct file *file)
413 err = -ENOMEM; 413 err = -ENOMEM;
414 cl = mei_cl_allocate(dev); 414 cl = mei_cl_allocate(dev);
415 if (!cl) 415 if (!cl)
416 goto out; 416 goto out_unlock;
417 417
418 err = -ENODEV; 418 err = -ENODEV;
419 if (dev->mei_state != MEI_ENABLED) { 419 if (dev->mei_state != MEI_ENABLED) {