[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181110155720.GA122918@ivb43>
Date: Sat, 10 Nov 2018 23:57:20 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: zoro <long17.cool@....com>
Cc: kbuild-all@...org, a.zummo@...ertech.it,
alexandre.belloni@...tlin.com, robh+dt@...nel.org,
mark.rutland@....com, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
zoro <long17.cool@....com>
Subject: [PATCH] rtc: sd3078: fix ptr_ret.cocci warnings
From: kbuild test robot <fengguang.wu@...el.com>
drivers/rtc/rtc-sd3078.c:248: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: e231edadd7fa ("rtc: sd3078: new driver.")
CC: zoro <long17.cool@....com>
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
---
url: https://github.com/0day-ci/linux/commits/zoro/dt-bindings-define-vendor-prefix-for-whwave-Inc/20181110-205048
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
rtc-sd3078.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/rtc/rtc-sd3078.c
+++ b/drivers/rtc/rtc-sd3078.c
@@ -245,10 +245,7 @@ static int sd3078_probe(struct i2c_clien
sd3078_driver.driver.name,
&sd3078_rtc_ops, THIS_MODULE);
- if (IS_ERR(sd3078->rtc))
- return PTR_ERR(sd3078->rtc);
-
- return 0;
+ return PTR_ERR_OR_ZERO(sd3078->rtc);
}
static int sd3078_remove(struct i2c_client *client)
Powered by blists - more mailing lists