From patchwork Tue Jan 3 13:39:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9494867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB45160413 for ; Tue, 3 Jan 2017 13:51:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E87BC26E16 for ; Tue, 3 Jan 2017 13:51:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC02626E54; Tue, 3 Jan 2017 13:51:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7094326E16 for ; Tue, 3 Jan 2017 13:51:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOPTc-00046E-S8; Tue, 03 Jan 2017 13:50:08 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOPTY-0003sc-Aa for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2017 13:50:05 +0000 X-IronPort-AV: E=Sophos;i="5.33,451,1477954800"; d="scan'208";a="206806072" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2017 14:39:59 +0100 Date: Tue, 3 Jan 2017 14:39:56 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Jaechul Lee Subject: [PATCH] input: tm2-touchkey: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170103_055004_762154_8F656DA2 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jaechul Lee , Andi Shyti , Chanwoo Choi , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Dmitry Torokhov , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , Javier Martinez Canillas , Kukjin Kim , Krzysztof Kozlowski , linux-input@vger.kernel.org, galaxyra@gmail.com, beomho.seo@samsung.com, kbuild-all@01.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Jaechul Lee Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- I have only looked at the extract of code that is shown here. It could be the test that is wrong. The code comes from: url: https://github.com/0day-ci/linux/commits/Jaechul-Lee/Add-touch-key-driver-su pport-for-TM2/20170103-183357 :::::: branch date: 2 hours ago :::::: commit date: 2 hours ago tm2-touchkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -196,7 +196,7 @@ static int tm2_touchkey_probe(struct i2c devm_regulator_get(&client->dev, "vdd"); if (IS_ERR(samsung_touchkey->regulator_vdd)) { dev_err(&client->dev, "Failed to get vdd regulator\n"); - return PTR_ERR(samsung_touchkey->regulator_vcc); + return PTR_ERR(samsung_touchkey->regulator_vdd); } /* power */