summaryrefslogtreecommitdiff
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2025-01-20 11:58:12 +0300
committerJiri Kosina <jkosina@suse.com>2025-01-20 11:58:12 +0300
commit670af65d2ab4a6a9bb72f014b080757e291ad3fe (patch)
treed54ccf4ba52fa9f15ed8f1de6214edc53e1502be /drivers/rtc/interface.c
parent53078a736fbc60e5d3a1e14f4cd4214003815026 (diff)
parent1b1d865715e0eda52e62226261651e97673773d6 (diff)
downloadlinux-670af65d2ab4a6a9bb72f014b080757e291ad3fe.tar.xz
Merge branch 'for-6.14/constify-bin-attribute' into for-linus
- constification of 'struct bin_attribute' in various HID driver (Thomas Weißschuh)
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r--drivers/rtc/interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index cca650b2e0b9..aaf76406cd7d 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -904,13 +904,18 @@ void rtc_timer_do_work(struct work_struct *work)
struct timerqueue_node *next;
ktime_t now;
struct rtc_time tm;
+ int err;
struct rtc_device *rtc =
container_of(work, struct rtc_device, irqwork);
mutex_lock(&rtc->ops_lock);
again:
- __rtc_read_time(rtc, &tm);
+ err = __rtc_read_time(rtc, &tm);
+ if (err) {
+ mutex_unlock(&rtc->ops_lock);
+ return;
+ }
now = rtc_tm_to_ktime(tm);
while ((next = timerqueue_getnext(&rtc->timerqueue))) {
if (next->expires > now)