summaryrefslogtreecommitdiff
path: root/drivers/input/serio/serio_raw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 11:13:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 11:13:54 -0700
commita818d8e43147f40864363456b37a00b819439307 (patch)
treec0a5139116747c2240f94c024e247a4efd1791c6 /drivers/input/serio/serio_raw.c
parentf901e753923192a7793e5d7591e2c03dcb252d68 (diff)
parent31968ecf584330b51a25b7bf881c2b632a02a3fb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Input: ALPS - fix stuck buttons on some touchpads Input: wm831x-on - convert to use genirq Input: ads7846 - add wakeup support Input: appletouch - fix integer overflow issue Input: ad7877 - increase pen up imeout Input: ads7846 - add support for AD7843 parts Input: bf54x-keys - fix system hang when pressing a key Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Input: remove BKL, fix input_open_file() locking Input: serio_raw - remove BKL Input: mousedev - remove BKL Input: add driver for TWL4030 vibrator device Input: enable remote wakeup for PNP i8042 keyboard ports Input: scancode in get/set_keycodes should be unsigned Input: i8042 - use platfrom_create_bundle() helper Input: wacom - merge out and in prox events Input: gamecon - fix off by one range check Input: wacom - replace WACOM_PKGLEN_PENABLED
Diffstat (limited to 'drivers/input/serio/serio_raw.c')
-rw-r--r--drivers/input/serio/serio_raw.c11
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;
}