[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6833564.Kp6CL1O0GI@wuerfel>
Date: Wed, 17 Feb 2016 13:55:11 +0100
From: Arnd Bergmann <arnd@...db.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Julia Lawall <julia.lawall@...6.fr>,
Raveendra Padasalagi <raveendra.padasalagi@...adcom.com>,
Scott Branden <scott.branden@...adcom.com>,
Jon Mason <jonmason@...adcom.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-kernel@...r.kernel.org,
Jonathan Richardson <jonathar@...adcom.com>,
Ray Jui <ray.jui@...adcom.com>, kbuild-all@...org,
linux-input@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH] input: fix odd_ptr_err.cocci warnings
On Wednesday 17 February 2016 07:29:05 Julia Lawall wrote:
> 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!
>
>
Looks correct to me
Reviewed-by: Arnd Bergmann <arnd@...db.de>
> if (IS_ERR(priv->regmap)) {
> - error = PTR_ERR(priv->regs);
> + error = PTR_ERR(priv->regmap);
I think this could have been avoided using
error = PTR_ERR_OR_ZERO(priv->regmap);
if (error) {
...
Arnd
Powered by blists - more mailing lists