mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org
Subject: [PATCH] rtc: pcf8523: fix ptr_ret.cocci warnings
Date: Tue, 17 Dec 2019 07:04:21 +0800	[thread overview]
Message-ID: <20191216230421.swtokuadkid666sd@4978f4969bb8> (raw)
In-Reply-To: <201912170716.3GlRTKMw%lkp@intel.com>

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

drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 93966243cf90 ("rtc: pcf8523: Remove struct pcf8523")
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d1eef1c619749b2a57e514a3fa67d9a516ffa919
commit: 93966243cf90c055d89b5ebfbb8dee0f9ac6b0a2 rtc: pcf8523: Remove struct pcf8523

 rtc-pcf8523.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/rtc/rtc-pcf8523.c
+++ b/drivers/rtc/rtc-pcf8523.c
@@ -358,10 +358,7 @@ static int pcf8523_probe(struct i2c_clie
 
 	rtc = devm_rtc_device_register(&client->dev, DRIVER_NAME,
 				       &pcf8523_rtc_ops, THIS_MODULE);
-	if (IS_ERR(rtc))
-		return PTR_ERR(rtc);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(rtc);
 }
 
 static const struct i2c_device_id pcf8523_id[] = {

  reply	other threads:[~2019-12-16 23:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 23:04 drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2019-12-16 23:04 ` kbuild test robot [this message]
2019-12-17 11:09   ` [PATCH] rtc: pcf8523: fix ptr_ret.cocci warnings Nobuhiro Iwamatsu
2020-01-04 17:13 drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2020-01-04 17:13 ` [PATCH] rtc: pcf8523: fix ptr_ret.cocci warnings kbuild test robot

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=20191216230421.swtokuadkid666sd@4978f4969bb8 \
    --to=lkp@intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=iwamatsu@nigauri.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.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

all inboxes | Powered by JetHome®