diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-15 14:27:06 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-15 14:27:06 +0000 |
commit | 2d3b5fa3a39d16c880bda3cf2bd9dd6ed5a01f74 (patch) | |
tree | e20283fe2ed46aa35c8ca5fc1724ba067cd2e2f8 /drivers/input/serio/serio_raw.c | |
parent | 3f17522ce461a31e7ced6311b28fcf5b8a763316 (diff) | |
parent | 7278a22143b003e9af7b9ca1b5f1c40ae4b55d98 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6
Diffstat (limited to 'drivers/input/serio/serio_raw.c')
-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 27fdaaffbb4..99866485444 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) struct serio_raw_list *list; int retval = 0; - lock_kernel(); retval = mutex_lock_interruptible(&serio_raw_mutex); 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; goto out; } @@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) 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; goto out; } @@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file) out: mutex_unlock(&serio_raw_mutex); -out_bkl: - unlock_kernel(); return retval; } |