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:
32c4746
)
rtc: rtc-davinci: return correct error code if rtc_device_register() fails
author
Devendra Naga
<
[email protected]
>
Tue, 18 Dec 2012 00:02:39 +0000
(16:02 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 18 Dec 2012 01:15:21 +0000
(17:15 -0800)
rtc_device_register() returns a pointer containing error code in case
of error. Use that in the error return.
Signed-off-by: Devendra Naga <
[email protected]
>
Cc: Alessandro Zummo <
[email protected]
>
Cc: Miguel Aguilar <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-davinci.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-davinci.c
b/drivers/rtc/rtc-davinci.c
index 14c2109dbaa3dbed844144864fa7b7a3d4190ec8..fd95316743c9f5ed8785c94fc235fd4357274ebb 100644
(file)
--- a/
drivers/rtc/rtc-davinci.c
+++ b/
drivers/rtc/rtc-davinci.c
@@
-529,8
+529,9
@@
static int __init davinci_rtc_probe(struct platform_device *pdev)
davinci_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
&davinci_rtc_ops, THIS_MODULE);
if (IS_ERR(davinci_rtc->rtc)) {
- dev_err(dev, "unable to register RTC device, err %ld\n",
- PTR_ERR(davinci_rtc->rtc));
+ ret = PTR_ERR(davinci_rtc->rtc);
+ dev_err(dev, "unable to register RTC device, err %d\n",
+ ret);
goto fail3;
}