diff mbox

Input: uinput - reversed test in uinput_setup_device()

Message ID 20110218091757.GB4384@bicker (mailing list archive)
State Accepted
Commit 163d27706bb91a648cc292151fc072e1e8cd4b4d
Headers show

Commit Message

Dan Carpenter Feb. 18, 2011, 9:17 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 7f8331f..364bdf4 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -362,7 +362,7 @@  static int uinput_setup_device(struct uinput_device *udev, const char __user *bu
 	dev = udev->dev;
 
 	user_dev = memdup_user(buffer, sizeof(struct uinput_user_dev));
-	if (!IS_ERR(user_dev))
+	if (IS_ERR(user_dev))
 		return PTR_ERR(user_dev);
 
 	udev->ff_effects_max = user_dev->ff_effects_max;