projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad87a76
)
drivers/rtc/rtc-da9052.c: use PTR_RET()
author
Sachin Kamat
<
[email protected]
>
Wed, 3 Jul 2013 22:07:48 +0000
(15:07 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 3 Jul 2013 23:07:59 +0000
(16:07 -0700)
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat <
[email protected]
>
Cc: David Dajun Chen <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-da9052.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-da9052.c
b/drivers/rtc/rtc-da9052.c
index 2f7fdd77a6f05cf77e6e0209920bed69a0361317..9c8c19441cc65211a0c3dbd63a5147ea6e7ff8b0 100644
(file)
--- a/
drivers/rtc/rtc-da9052.c
+++ b/
drivers/rtc/rtc-da9052.c
@@
-15,6
+15,7
@@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
+#include <linux/err.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>
@@
-249,10
+250,7
@@
static int da9052_rtc_probe(struct platform_device *pdev)
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&da9052_rtc_ops, THIS_MODULE);
- if (IS_ERR(rtc->rtc))
- return PTR_ERR(rtc->rtc);
-
- return 0;
+ return PTR_RET(rtc->rtc);
}
static struct platform_driver da9052_rtc_driver = {