summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2026-01-22 17:00:31 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-02-20 23:12:17 +0100
commit76e8919aef2dca25a07a0d6480e486ebe5e9ea79 (patch)
tree4b028a34732709b16897e3a5b668a1b896cec57b /drivers
parentd1f64cdfafdbd3fe220a59b85f13e125f49ce73e (diff)
rtc: class: Remove duplicate check for alarm
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index b1a2be1f9e3b..84885ba6135c 100644
--- 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);