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: 8338411 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A79BAC02AA for ; Wed, 17 Feb 2016 12:39:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2E33202AE for ; Wed, 17 Feb 2016 12:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCBF3202B8 for ; Wed, 17 Feb 2016 12:39:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934334AbcBQMjG (ORCPT ); Wed, 17 Feb 2016 07:39:06 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46694 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934549AbcBQMjD (ORCPT ); Wed, 17 Feb 2016 07:39:03 -0500 X-Greylist: delayed 590 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Feb 2016 07:39:03 EST 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 cc: kbuild-all@01.org, Ray Jui , Scott Branden , Dmitry Torokhov , Jon Mason , Jonathan Richardson , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org 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 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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(-) -- 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/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;