Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753522AbbEKKYY (ORCPT ); Mon, 11 May 2015 06:24:24 -0400 Received: from 1.mo69.mail-out.ovh.net ([178.33.251.173]:51615 "EHLO 1.mo69.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068AbbEKKYU (ORCPT ); Mon, 11 May 2015 06:24:20 -0400 X-Greylist: delayed 2344 seconds by postgrey-1.27 at vger.kernel.org; Mon, 11 May 2015 06:24:19 EDT Message-ID: <55507B9A.4060700@armadeus.com> Date: Mon, 11 May 2015 11:51:22 +0200 From: =?windows-1252?Q?S=E9bastien_Szymanski?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dmitry Torokhov , linux-input@vger.kernel.org CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: sx8654 - fix memory allocation check References: <20150508235031.GA29274@dtor-ws> In-Reply-To: <20150508235031.GA29274@dtor-ws> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 8801159572423922712 X-Ovh-Remote: 83.141.169.122 (ip-83-141-169-122.evc.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeektddrleeiucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeektddrleeiucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 43 Hello, Acked-by: S?bastien Szymanski On 05/09/2015 01:50 AM, Dmitry Torokhov wrote: > We have been testing wrong variable when trying to make sure that input > allocation succeeded. > > Reported by Coverity (CID 1295918). > > Signed-off-by: Dmitry Torokhov > --- > drivers/input/touchscreen/sx8654.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c > index aecb9ad..642f4a5 100644 > --- a/drivers/input/touchscreen/sx8654.c > +++ b/drivers/input/touchscreen/sx8654.c > @@ -187,7 +187,7 @@ static int sx8654_probe(struct i2c_client *client, > return -ENOMEM; > > input = devm_input_allocate_device(&client->dev); > - if (!sx8654) > + if (!input) > return -ENOMEM; > > input->name = "SX8654 I2C Touchscreen"; > -- S?bastien Szymanski Software Engineer Armadeus Systems - A new vision of the embedded world sebastien.szymanski@armadeus.com Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/