Skip to content

Commit

Permalink
synclink: add mutex_unlock() on error path
Browse files Browse the repository at this point in the history
There is a path which still holds its mutex here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 24, 2010
1 parent 49bf7ea commit 80d04f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/char/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp)
if (info->port.count == 1) {
/* 1st open on this device, init hardware */
retval = startup(info);
if (retval < 0)
if (retval < 0) {
mutex_unlock(&info->port.mutex);
goto cleanup;
}
}
mutex_unlock(&info->port.mutex);
retval = block_til_ready(tty, filp, info);
Expand Down

0 comments on commit 80d04f2

Please sign in to comment.