[PATCH 2/2] timekeeping: Drop the aux_tkd checks in aux_clock_set() and aux_clock_adj()
From: Thomas Weißschuh (Schneider Electric)
Date: Thu Dec 03 2026 - 10:16:54 EST
These functions can only be called for auxiliary clocks.
aux_tkd can therefore never be NULL.
Remove the pointless checks.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
---
kernel/time/timekeeping.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index c3a87e434718..65753a890c33 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -3234,8 +3234,6 @@ static int aux_clock_set(const clockid_t id, const struct timespec64 *tnew)
if (!timespec64_valid_settod(tnew))
return -EINVAL;
- if (!aux_tkd)
- return -ENODEV;
ret = security_settime64(tnew, NULL);
if (ret)
return ret;
@@ -3277,9 +3275,6 @@ static int aux_clock_adj(const clockid_t id, struct __kernel_timex *txc)
struct tk_data *aux_tkd = aux_get_tk_data(id);
struct adjtimex_result result = { };
- if (!aux_tkd)
- return -ENODEV;
-
/*
* @result is ignored for now as there are neither hrtimers nor a
* RTC related to auxiliary clocks for now.
--
2.56.1