mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 14:02:10 +00:00
HID: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
72b67048f5
commit
702e57d9ef
@ -30,6 +30,7 @@
|
||||
#include <linux/major.h>
|
||||
#include <linux/hid.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <linux/hidraw.h>
|
||||
|
||||
@ -157,6 +158,7 @@ static int hidraw_open(struct inode *inode, struct file *file)
|
||||
struct hidraw_list *list;
|
||||
int err = 0;
|
||||
|
||||
lock_kernel();
|
||||
if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
@ -183,6 +185,7 @@ static int hidraw_open(struct inode *inode, struct file *file)
|
||||
out_unlock:
|
||||
spin_unlock(&minors_lock);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return err;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user