From: Julia Lawall <julia.lawall@lip6.fr>
To: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Cc: kbuild-all@01.org, Ray Jui <ray.jui@broadcom.com>,
Scott Branden <scott.branden@broadcom.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jon Mason <jonmason@broadcom.com>,
Jonathan Richardson <jonathar@broadcom.com>,
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
Date: Wed, 17 Feb 2016 07:29:05 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.10.1602170724320.2685@hadrien> (raw)
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 <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
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;
next reply other threads:[~2016-02-17 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 12:29 Julia Lawall [this message]
2016-02-17 12:55 ` [PATCH] input: fix odd_ptr_err.cocci warnings Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1602170724320.2685@hadrien \
--to=julia.lawall@lip6.fr \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jonathar@broadcom.com \
--cc=jonmason@broadcom.com \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raveendra.padasalagi@broadcom.com \
--cc=ray.jui@broadcom.com \
--cc=scott.branden@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).