提交 80d04f22 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

synclink: add mutex_unlock() on error path

There is a path which still holds its mutex here.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册