Commit 77554b4d authored by Thadeu Lima de Souza Cascardo's avatar Thadeu Lima de Souza Cascardo Committed by Dmitry Torokhov

Input: serio_raw - remove BKL

serio_raw open function already uses a mutex. Also change formatting
a bit.
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent c90c6a88
...@@ -81,12 +81,12 @@ static int serio_raw_open(struct inode *inode, struct file *file) ...@@ -81,12 +81,12 @@ static int serio_raw_open(struct inode *inode, struct file *file)
struct serio_raw_list *list; struct serio_raw_list *list;
int retval = 0; int retval = 0;
lock_kernel();
retval = mutex_lock_interruptible(&serio_raw_mutex); retval = mutex_lock_interruptible(&serio_raw_mutex);
if (retval) if (retval)
goto out_bkl; return retval;
if (!(serio_raw = serio_raw_locate(iminor(inode)))) { serio_raw = serio_raw_locate(iminor(inode));
if (!serio_raw) {
retval = -ENODEV; retval = -ENODEV;
goto out; goto out;
} }
...@@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) ...@@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file)
goto out; goto out;
} }
if (!(list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL))) { list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL);
if (!list) {
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
} }
...@@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file) ...@@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file)
out: out:
mutex_unlock(&serio_raw_mutex); mutex_unlock(&serio_raw_mutex);
out_bkl:
unlock_kernel();
return retval; return retval;
} }
......
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