linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>,
	Daniel Mack <daniel@caiaq.de>, Ping Cheng <pingc@wacom.com>,
	Aristeu Rozanski <aris@ruivo.org>,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] Input: uinput - reversed test in uinput_setup_device()
Date: Fri, 18 Feb 2011 08:31:22 -0800	[thread overview]
Message-ID: <20110218163122.GA9521@core.coreip.homeip.net> (raw)
In-Reply-To: <20110218091757.GB4384@bicker>

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

      reply	other threads:[~2011-02-18 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18  9:17 [patch] Input: uinput - reversed test in uinput_setup_device() Dan Carpenter
2011-02-18 16:31 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110218163122.GA9521@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=aris@ruivo.org \
    --cc=daniel@caiaq.de \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=pingc@wacom.com \
    --cc=rydberg@euromail.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).