Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100380
b: refs/heads/master
c: 9edca64
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent cb66cd3 commit ba41f1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 556e4b0b69d6e45e6b4e61390ef5aebce3ea432d
refs/heads/master: 9edca64b724db74373f0c9ef7cb044a5f221a4a3
6 changes: 5 additions & 1 deletion trunk/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 ba41f1d

Please sign in to comment.