Input: uinput - reversed test in uinput_setup_device()
authorDan Carpenter <error27@gmail.com>
Fri, 18 Feb 2011 16:30:52 +0000 (08:30 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 21 Feb 2011 09:02:34 +0000 (01:02 -0800)
The test here is reversed. It should be if (IS_ERR()) instead of
if (!IS_ERR()).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/uinput.c

index 7f8331f45bad4199e35b12b1c1f6951817867370..364bdf43a381d8a052c730eb38eb005c0f006c0c 100644 (file)
@@ -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;