projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08ec212
)
TTY: hvcs: fix missing unlock on error in hvcs_initialize()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Mon, 22 Oct 2012 04:42:59 +0000
(12:42 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 18:37:02 +0000
(11:37 -0700)
Add the missing unlock on the error handling path in function
hvcs_initialize().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvcs.c
patch
|
blob
|
history
diff --git
a/drivers/tty/hvc/hvcs.c
b/drivers/tty/hvc/hvcs.c
index cab5c7adf8e84314e9ee515465a0db07bb1687e5..744c3b8eea49dbfb141a90bf3a0ad09e2d8f320e 100644
(file)
--- a/
drivers/tty/hvc/hvcs.c
+++ b/
drivers/tty/hvc/hvcs.c
@@
-1496,8
+1496,10
@@
static int __devinit hvcs_initialize(void)
num_ttys_to_alloc = hvcs_parm_num_devs;
hvcs_tty_driver = alloc_tty_driver(num_ttys_to_alloc);
- if (!hvcs_tty_driver)
+ if (!hvcs_tty_driver) {
+ mutex_unlock(&hvcs_init_mutex);
return -ENOMEM;
+ }
if (hvcs_alloc_index_list(num_ttys_to_alloc)) {
rc = -ENOMEM;