From: Dan Carpenter Date: Fri, 18 Feb 2011 16:30:52 +0000 (-0800) Subject: Input: uinput - reversed test in uinput_setup_device() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=163d27706bb91a648cc292151fc072e1e8cd4b4d;p=openwrt%2Fstaging%2Fblogic.git Input: uinput - reversed test in uinput_setup_device() The test here is reversed. It should be if (IS_ERR()) instead of if (!IS_ERR()). Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 7f8331f45bad..364bdf43a381 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;