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>
This commit is contained in:
Jinjie Ruan
2026-01-22 17:00:31 +08:00
committed by Alexandre Belloni
parent d1f64cdfaf
commit 76e8919aef

View File

@@ -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);