public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2019-12-16 23:04 kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2019-12-16 23:04 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu; +Cc: kbuild-all, linux-kernel, Alexandre Belloni

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

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

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

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2020-01-04 17:13 kbuild test robot
  2020-01-04 17:13 ` [PATCH] rtc: pcf8523: fix ptr_ret.cocci warnings kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2020-01-04 17:13 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu; +Cc: kbuild-all, linux-kernel, Alexandre Belloni

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3a562aee727a7bfbb3a37b1aa934118397dad701
commit: 93966243cf90c055d89b5ebfbb8dee0f9ac6b0a2 rtc: pcf8523: Remove struct pcf8523
date:   5 weeks ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

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

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] rtc: pcf8523: fix ptr_ret.cocci warnings
  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 ` kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-01-04 17:13 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: kbuild-all, linux-kernel, Alexandre Belloni, Alessandro Zummo,
	linux-rtc

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:   3a562aee727a7bfbb3a37b1aa934118397dad701
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[] = {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-04 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2019-12-16 23:04 drivers/rtc/rtc-pcf8523.c:361:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox