linux/kernel/time
Dan Carpenter c7418164b4 timekeeping: Fix error code in tk_aux_sysfs_init()
If kobject_create_and_add() fails on the first iteration, then the error
code is set to -ENOMEM which is correct. But if it fails in subsequent
iterations then "ret" is zero, which means success, but it should be
-ENOMEM.

Set the error code to -ENOMEM correctly.

Fixes: 7b5ab04f03 ("timekeeping: Fix resource leak in tk_aux_sysfs_init() error paths")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Malaya Kumar Rout <mrout@redhat.com>
Link: https://patch.msgid.link/aSW1R8q5zoY_DgQE@stanley.mountain
2025-11-25 17:52:24 +01:00
..
Kconfig
Makefile time: Build generic update_vsyscall() only with generic time vDSO 2025-09-04 11:23:50 +02:00
alarmtimer.c time: Fix spelling mistakes in comments 2025-09-21 10:02:02 +02:00
clockevents.c tick: Do not set device to detached state in tick_shutdown() 2025-09-09 13:39:00 +02:00
clocksource-wdtest.c
clocksource.c time: Fix spelling mistakes in comments 2025-09-21 10:02:02 +02:00
hrtimer.c Updates for the time(rs) core subsystem: 2025-09-30 16:09:27 -07:00
itimer.c timers/itimer: Avoid direct access to hrtimer clockbase 2025-09-09 12:27:17 +02:00
jiffies.c
namespace.c namespace-6.18-rc1 2025-09-29 11:20:29 -07:00
ntp.c
ntp_internal.h
posix-clock.c
posix-cpu-timers.c
posix-stubs.c
posix-timers.c posix-timers: Plug potential memory leak in do_timer_create() 2025-11-14 16:58:31 +01:00
posix-timers.h
sched_clock.c time/sched_clock: Export symbol for sched_clock register function 2025-09-23 10:52:31 +02:00
sleep_timeout.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c tick: Do not set device to detached state in tick_shutdown() 2025-09-09 13:39:00 +02:00
tick-internal.h tick: Do not set device to detached state in tick_shutdown() 2025-09-09 13:39:00 +02:00
tick-legacy.c
tick-oneshot.c
tick-sched.c tick/sched: Fix bogus condition in report_idle_softirq() 2025-11-19 19:30:45 +01:00
tick-sched.h
time.c time: export timespec64_add_safe() symbol 2025-09-03 16:51:08 -07:00
time_test.c
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c timekeeping: Fix error code in tk_aux_sysfs_init() 2025-11-25 17:52:24 +01:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c timers: Fix NULL function pointer race in timer_shutdown_sync() 2025-11-22 22:55:26 +01:00
timer_list.c hrtimer: Remove hrtimer_clock_base:: Get_time 2025-09-09 12:27:18 +02:00
timer_migration.c
timer_migration.h
vsyscall.c vdso/vsyscall: Avoid slow division loop in auxiliary clock update 2025-09-03 11:55:11 +02:00