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
alarmtimer.c
clockevents.c
clocksource-wdtest.c
clocksource.c
hrtimer.c
itimer.c
jiffies.c
namespace.c
ntp.c
ntp_internal.h
posix-clock.c
posix-cpu-timers.c
posix-stubs.c
posix-timers.c
posix-timers.h
sched_clock.c
sleep_timeout.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c
tick-internal.h
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_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
timer_migration.c
timer_migration.h
vsyscall.c