Skip to content

Commit

Permalink
serio: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent 556e4b0 commit 9edca64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/input/serio/serio_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/serio.h>
Expand Down Expand Up @@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file)
struct serio_raw_list *list;
int retval = 0;

lock_kernel();
retval = mutex_lock_interruptible(&serio_raw_mutex);
if (retval)
return retval;
goto out_bkl;

if (!(serio_raw = serio_raw_locate(iminor(inode)))) {
retval = -ENODEV;
Expand All @@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file)

out:
mutex_unlock(&serio_raw_mutex);
out_bkl:
unlock_kernel();
return retval;
}

Expand Down

0 comments on commit 9edca64

Please sign in to comment.