Commit 80d04f22 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

synclink: add mutex_unlock() on error path

There is a path which still holds its mutex here.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 49bf7eaf
...@@ -691,8 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp) ...@@ -691,8 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp)
if (info->port.count == 1) { if (info->port.count == 1) {
/* 1st open on this device, init hardware */ /* 1st open on this device, init hardware */
retval = startup(info); retval = startup(info);
if (retval < 0) if (retval < 0) {
mutex_unlock(&info->port.mutex);
goto cleanup; goto cleanup;
}
} }
mutex_unlock(&info->port.mutex); mutex_unlock(&info->port.mutex);
retval = block_til_ready(tty, filp, info); retval = block_til_ready(tty, filp, info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment