From patchwork Wed Feb 17 12:29:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 8338471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4554A9F2F0 for ; Wed, 17 Feb 2016 12:43:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B1EC202EB for ; Wed, 17 Feb 2016 12:43:15 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id AE734202AE for ; Wed, 17 Feb 2016 12:43:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aW1QC-0005hP-BK; Wed, 17 Feb 2016 12:41:32 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aW1Q8-0005WY-Hj for linux-arm-kernel@lists.infradead.org; Wed, 17 Feb 2016 12:41:29 +0000 X-IronPort-AV: E=Sophos;i="5.22,460,1449529200"; d="scan'208";a="165035396" Received: from 68-74-177-106.lightspeed.wepbfl.sbcglobal.net (HELO hadrien) ([68.74.177.106]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Feb 2016 13:29:07 +0100 Date: Wed, 17 Feb 2016 07:29:05 -0500 (EST) From: Julia Lawall X-X-Sender: jll@hadrien To: Raveendra Padasalagi Subject: [PATCH] input: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160217_044129_066524_05FE0BC8 X-CRM114-Status: GOOD ( 13.64 ) X-Spam-Score: -6.1 (------) 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: Scott Branden , Jon Mason , Dmitry Torokhov , linux-kernel@vger.kernel.org, Jonathan Richardson , Ray Jui , kbuild-all@01.org, linux-input@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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 Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Reviewed-by: Arnd Bergmann --- I haven't checked the context in detail. There can be false positives, when it is the call to IS_ERR that is wrong. tree: https://github.com/Broadcom/arm64-linux iproc-tsc-v2 head: ef32cf1baeb934bfcdf7c9eb8ad345aae266cde5 commit: c3afc7a1c330ce452c52e2183a23b2ab9f70bd4a [2/3] input: syscon support in bcm_iproc_tsc driver Please take the patch only if it's a positive warning. Thanks! bcm_iproc_tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/touchscreen/bcm_iproc_tsc.c +++ b/drivers/input/touchscreen/bcm_iproc_tsc.c @@ -492,7 +492,7 @@ static int iproc_ts_probe(struct platfor pdev->dev.of_node, "ts_syscon"); if (IS_ERR(priv->regmap)) { - error = PTR_ERR(priv->regs); + error = PTR_ERR(priv->regmap); dev_err(&pdev->dev, "unable to map I/O memory:%d\n", error); return error;