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: 9494857 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 4A22A60413 for ; Tue, 3 Jan 2017 13:43:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F1026E16 for ; Tue, 3 Jan 2017 13:43:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BB3826E54; Tue, 3 Jan 2017 13:43:12 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FBC9269E2 for ; Tue, 3 Jan 2017 13:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759003AbdACNkw (ORCPT ); Tue, 3 Jan 2017 08:40:52 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:18816 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758962AbdACNkD (ORCPT ); Tue, 3 Jan 2017 08:40:03 -0500 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 cc: Dmitry Torokhov , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , kbuild-all@01.org, Jaechul Lee , Andi Shyti , Chanwoo Choi , beomho.seo@samsung.com, galaxyra@gmail.com, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org 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 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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 */