mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
synclink: add mutex_unlock() on error path
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>
This commit is contained in:
parent
49bf7eaffc
commit
80d04f22b0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user