[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1602170724320.2685@hadrien>
Date: Wed, 17 Feb 2016 07:29:05 -0500 (EST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Raveendra Padasalagi <raveendra.padasalagi@...adcom.com>
cc: kbuild-all@...org, Ray Jui <ray.jui@...adcom.com>,
Scott Branden <scott.branden@...adcom.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jon Mason <jonmason@...adcom.com>,
Jonathan Richardson <jonathar@...adcom.com>,
linux-input@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: [PATCH] input: fix odd_ptr_err.cocci warnings
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@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.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;
Powered by blists - more mailing lists