From patchwork Fri Feb 18 09:17:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 573851 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1I9I76E031678 for ; Fri, 18 Feb 2011 09:18:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932095Ab1BRJSS (ORCPT ); Fri, 18 Feb 2011 04:18:18 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:64842 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757906Ab1BRJSQ (ORCPT ); Fri, 18 Feb 2011 04:18:16 -0500 Received: by bwz15 with SMTP id 15so531420bwz.19 for ; Fri, 18 Feb 2011 01:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=cGb80HCdok9T19X0YEuoVFhDTeRqpV0rZLvMOXdpfLY=; b=rxaRIc3s+/BKSTLl68lVaQdqVnblRgahdwWDwAPfkb1fRRzFyTMgCQLE+TzqIgSNet /xBHVzolfDdnuufAbAxMmmae3T8siIMsDJlc1bhG4ep7m5eLUI/oitL9lkC2BpnpRRX4 rQ0q2M05CQk1aVQSDvZZDJe7bY3l0KycJX4yA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=LYauaZMOs5M1JSspd6siQjtpPP6lcHnyYkJS2lOIMrIk7D/3jBJk6YDFKchtU5Ozjg m8OF3GWN5F/Ks0NjVPgNVHNqOWL69Movn90d7XhWf6WWNMVdoOo6cxb2VRHeQkZALYRJ /HmhiLzzBT+oSg0LapGDb/voAb2sslwymx5WY= Received: by 10.204.71.77 with SMTP id g13mr403981bkj.170.1298020695203; Fri, 18 Feb 2011 01:18:15 -0800 (PST) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id b6sm1307932bkb.22.2011.02.18.01.18.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Feb 2011 01:18:13 -0800 (PST) Date: Fri, 18 Feb 2011 12:17:57 +0300 From: Dan Carpenter To: Dmitry Torokhov Cc: Henrik Rydberg , Daniel Mack , Ping Cheng , Aristeu Rozanski , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] Input: uinput - reversed test in uinput_setup_device() Message-ID: <20110218091757.GB4384@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 18 Feb 2011 09:18:47 +0000 (UTC) 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;