* [patch] Input: uinput - reversed test in uinput_setup_device()
@ 2011-02-18 9:17 Dan Carpenter
2011-02-18 16:31 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-02-18 9:17 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Henrik Rydberg, Daniel Mack, Ping Cheng, Aristeu Rozanski,
linux-input, kernel-janitors
The test here is reversed. It should be if (IS_ERR()) instead of
if (!IS_ERR()).
Signed-off-by: Dan Carpenter <error27@gmail.com>
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] Input: uinput - reversed test in uinput_setup_device()
2011-02-18 9:17 [patch] Input: uinput - reversed test in uinput_setup_device() Dan Carpenter
@ 2011-02-18 16:31 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2011-02-18 16:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Henrik Rydberg, Daniel Mack, Ping Cheng, Aristeu Rozanski,
linux-input, kernel-janitors
On Fri, Feb 18, 2011 at 12:17:57PM +0300, Dan Carpenter wrote:
> The test here is reversed. It should be if (IS_ERR()) instead of
> if (!IS_ERR()).
>
Awww, crap...
Applied, thanks Dan.
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> 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;
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-18 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 9:17 [patch] Input: uinput - reversed test in uinput_setup_device() Dan Carpenter
2011-02-18 16:31 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).