[PATCH] cdc-acm: don't unlock acm->mutex on error path

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexey Dobriyan
Date: Wednesday, July 23, 2008 - 6:23 am

On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote:

Try this:

[PATCH] cdc-acm: don't unlock acm->mutex on error path

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/usb/class/cdc-acm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -595,8 +595,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
 	tasklet_schedule(&acm->urb_task);
 
 done:
-err_out:
 	mutex_unlock(&acm->mutex);
+err_out:
 	mutex_unlock(&open_mutex);
 	return rv;
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kernel oops, Andrei Popa, (Wed Jul 23, 5:52 am)
[PATCH] cdc-acm: don't unlock acm->mutex on error path, Alexey Dobriyan, (Wed Jul 23, 6:23 am)
Re: kernel oops, Vegard Nossum, (Wed Jul 23, 10:11 am)
Re: kernel oops, Vegard Nossum, (Mon Aug 18, 9:33 am)
Re: kernel oops, Greg KH, (Mon Aug 18, 9:39 am)