diff options
Diffstat (limited to 'drivers')
| -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 27fdaaffbb40..998664854440 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) | |||
| 81 | struct serio_raw_list *list; | 81 | struct serio_raw_list *list; |
| 82 | int retval = 0; | 82 | int retval = 0; |
| 83 | 83 | ||
| 84 | lock_kernel(); | ||
| 85 | retval = mutex_lock_interruptible(&serio_raw_mutex); | 84 | retval = mutex_lock_interruptible(&serio_raw_mutex); |
| 86 | if (retval) | 85 | if (retval) |
| 87 | goto out_bkl; | 86 | return retval; |
| 88 | 87 | ||
| 89 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { | 88 | serio_raw = serio_raw_locate(iminor(inode)); |
| 89 | if (!serio_raw) { | ||
| 90 | retval = -ENODEV; | 90 | retval = -ENODEV; |
| 91 | goto out; | 91 | goto out; |
| 92 | } | 92 | } |
| @@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
| 96 | goto out; | 96 | goto out; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | if (!(list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL))) { | 99 | list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL); |
| 100 | if (!list) { | ||
| 100 | retval = -ENOMEM; | 101 | retval = -ENOMEM; |
| 101 | goto out; | 102 | goto out; |
| 102 | } | 103 | } |
| @@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
| 109 | 110 | ||
| 110 | out: | 111 | out: |
| 111 | mutex_unlock(&serio_raw_mutex); | 112 | mutex_unlock(&serio_raw_mutex); |
| 112 | out_bkl: | ||
| 113 | unlock_kernel(); | ||
| 114 | return retval; | 113 | return retval; |
| 115 | } | 114 | } |
| 116 | 115 | ||
