Skip to content

Commit 76e8919

Browse files
ruanjinjie-engalexandrebelloni
authored andcommitted
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>
1 parent d1f64cd commit 76e8919

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc)
410410

411411
/* Check to see if there is an ALARM already set in hw */
412412
err = __rtc_read_alarm(rtc, &alrm);
413-
if (!err && !rtc_valid_tm(&alrm.time))
413+
if (!err)
414414
rtc_initialize_alarm(rtc, &alrm);
415415

416416
rtc_dev_prepare(rtc);

0 commit comments

Comments
 (0)