diff options
author | Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> | 2010-03-09 23:38:47 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-10 01:05:48 -0500 |
commit | 77554b4d1fac6a66d4e624a6e36c020a4f5b6b64 (patch) | |
tree | 184da5a6768a7f87d3761d7d49e48ef06acc6d8d | |
parent | c90c6a885ac9827921e8f94f3ce4360ae11148f1 (diff) |
Input: serio_raw - remove BKL
serio_raw open function already uses a mutex. Also change formatting
a bit.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/serio/serio_raw.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 27fdaaffbb40..998664854440 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -81,12 +81,12 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
81 | struct serio_raw_list *list; | 81 | struct serio_raw_list *list; |
82 | int retval = 0; | 82 | int retval = 0; |
83 | 83 | ||
84 | lock_kernel(); | ||
85 | retval = mutex_lock_interruptible(&serio_raw_mutex); | 84 | retval = mutex_lock_interruptible(&serio_raw_mutex); |
86 | if (retval) | 85 | if (retval) |
87 | goto out_bkl; | 86 | return retval; |
88 | 87 | ||
89 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { | 88 | serio_raw = serio_raw_locate(iminor(inode)); |
89 | if (!serio_raw) { | ||
90 | retval = -ENODEV; | 90 | retval = -ENODEV; |
91 | goto out; | 91 | goto out; |
92 | } | 92 | } |
@@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
96 | goto out; | 96 | goto out; |
97 | } | 97 | } |
98 | 98 | ||
99 | if (!(list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL))) { | 99 | list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL); |
100 | if (!list) { | ||
100 | retval = -ENOMEM; | 101 | retval = -ENOMEM; |
101 | goto out; | 102 | goto out; |
102 | } | 103 | } |
@@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
109 | 110 | ||
110 | out: | 111 | out: |
111 | mutex_unlock(&serio_raw_mutex); | 112 | mutex_unlock(&serio_raw_mutex); |
112 | out_bkl: | ||
113 | unlock_kernel(); | ||
114 | return retval; | 113 | return retval; |
115 | } | 114 | } |
116 | 115 | ||