linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Input: fix odd_ptr_err.cocci warnings
Date: Thu, 7 Apr 2022 08:09:14 +0800	[thread overview]
Message-ID: <Yk4rqrdKDmrZPHGo@a687d38df4c1> (raw)
In-Reply-To: <202204070801.hNvu3cEu-lkp@intel.com>

From: kernel test robot <lkp@intel.com>

drivers/input/misc/isa1200.c:327:5-11: inconsistent IS_ERR and PTR_ERR on line 328.
drivers/input/misc/isa1200.c:332:5-11: inconsistent IS_ERR and PTR_ERR on line 333.

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call to
 IS_ERR that is wrong.

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-janice-v5.18-rc1
head:   7d27ddbe075c07508ab045a63d23aeca798514ee
commit: 0baaba96c1a1116b9fc698a263657cb9b6ab8198 [18/21] Input: isa1200 - new driver for Immersion ISA1200
:::::: branch date: 27 hours ago
:::::: commit date: 29 hours ago

 drivers/input/misc/isa1200.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/input/misc/isa1200.c
+++ b/drivers/input/misc/isa1200.c
@@ -325,12 +325,12 @@ static int isa1200_probe(struct i2c_clie
 
 	isa->hen = devm_gpiod_get(dev, "hen", GPIOD_OUT_LOW);
 	if (IS_ERR(isa->hen)) {
-		ret = PTR_ERR(isa->map);
+		ret = PTR_ERR(isa->hen);
 		return dev_err_probe(dev, ret, "failed to get HEN GPIO\n");
 	}
 	isa->len = devm_gpiod_get(dev, "len", GPIOD_OUT_LOW);
 	if (IS_ERR(isa->hen)) {
-		ret = PTR_ERR(isa->map);
+		ret = PTR_ERR(isa->hen);
 		return dev_err_probe(dev, ret, "failed to get LEN GPIO\n");
 	}
 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

       reply	other threads:[~2022-04-07  0:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202204070801.hNvu3cEu-lkp@intel.com>
2022-04-07  0:09 ` kernel test robot [this message]
2016-02-17 12:29 [PATCH] input: fix odd_ptr_err.cocci warnings Julia Lawall
2016-02-17 12:55 ` 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=Yk4rqrdKDmrZPHGo@a687d38df4c1 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).