Commit 11f54d05 authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Torvalds

drivers/rtc/rtc-da9052.c: use PTR_RET()

Use of PTR_RET() simplifies the code.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ad87a766
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/err.h>
#include <linux/mfd/da9052/da9052.h> #include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h> #include <linux/mfd/da9052/reg.h>
...@@ -249,10 +250,7 @@ static int da9052_rtc_probe(struct platform_device *pdev) ...@@ -249,10 +250,7 @@ static int da9052_rtc_probe(struct platform_device *pdev)
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&da9052_rtc_ops, THIS_MODULE); &da9052_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc)) return PTR_RET(rtc->rtc);
return PTR_ERR(rtc->rtc);
return 0;
} }
static struct platform_driver da9052_rtc_driver = { static struct platform_driver da9052_rtc_driver = {
......
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