Commit 202cc98a authored by kbuild test robot's avatar kbuild test robot Committed by Alexandre Belloni

rtc: gemini: fix ptr_ret.cocci warnings

drivers/rtc/rtc-gemini.c:151: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
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent e7cba884
...@@ -148,10 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev) ...@@ -148,10 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev)
rtc->rtc_dev = rtc_device_register(pdev->name, dev, rtc->rtc_dev = rtc_device_register(pdev->name, dev,
&gemini_rtc_ops, THIS_MODULE); &gemini_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc_dev)) return PTR_ERR_OR_ZERO(rtc->rtc_dev);
return PTR_ERR(rtc->rtc_dev);
return 0;
} }
static int gemini_rtc_remove(struct platform_device *pdev) static int gemini_rtc_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment