Skip to content

Commit

Permalink
Input: uinput - reversed test in uinput_setup_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Feb 21, 2011
1 parent 919ed89 commit 163d277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 163d277

Please sign in to comment.