input: remove BKL from uinput open function
diff mbox

Message ID 20100131052942.GA12320@core.coreip.homeip.net
State New, archived
Headers show

Commit Message

Dmitry Torokhov Jan. 31, 2010, 5:29 a.m. UTC
None

Patch
diff mbox

diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 18206e1..7089151 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -278,6 +278,7 @@  static int uinput_create_device(struct uinput_device *udev)
 static int uinput_open(struct inode *inode, struct file *file)
 {
 	struct uinput_device *newdev;
+	int error;
 
 	newdev = kzalloc(sizeof(struct uinput_device), GFP_KERNEL);
 	if (!newdev)
@@ -291,6 +292,12 @@  static int uinput_open(struct inode *inode, struct file *file)
 
 	file->private_data = newdev;
 
+	error = nonseekable_open(inode, file);
+	if (error) {
+		kfree(newdev);
+		return error;
+	}
+
 	return 0;
 }