diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-11-25 16:55:19 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-11-25 17:52:24 +0100 |
| commit | c7418164b463056bf4327b6a2abe638b78250f13 (patch) | |
| tree | 5246c720af7982f3b50af2261b133866dc663e43 /drivers/usb/cdns3/cdns3-pci-wrap.c | |
| parent | ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d (diff) | |
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: 7b5ab04f035f ("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
Diffstat (limited to 'drivers/usb/cdns3/cdns3-pci-wrap.c')
0 files changed, 0 insertions, 0 deletions
