projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1f64cd
)
rtc: class: Remove duplicate check for alarm
author
Jinjie Ruan
<ruanjinjie@huawei.com>
Thu, 22 Jan 2026 09:00:31 +0000
(17:00 +0800)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Fri, 20 Feb 2026 22:12:17 +0000
(23:12 +0100)
In __devm_rtc_register_device(), the callee rtc_initialize_alarm()
will check the alarm, there is no need to check in advance,
so remove it.
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link:
https://patch.msgid.link/20260122090031.3871746-1-ruanjinjie@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/class.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/class.c
b/drivers/rtc/class.c
index
b1a2be1
..
84885ba
100644
(file)
--- a/
drivers/rtc/class.c
+++ b/
drivers/rtc/class.c
@@
-410,7
+410,7
@@
int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc)
/* Check to see if there is an ALARM already set in hw */
err = __rtc_read_alarm(rtc, &alrm);
- if (!err
&& !rtc_valid_tm(&alrm.time)
)
+ if (!err)
rtc_initialize_alarm(rtc, &alrm);
rtc_dev_prepare(rtc);