mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
ptp_clock_register() exposes the clock to userspace. If either following initialization operation fails, probe returns and devres frees idtfc3 while the registered clock still refers to the clock information embedded in it. Complete the fallible initialization before registering the clock. Schedule the worker after registration because it requires the registered clock. This removes post-registration failures and avoids exposing a partially initialized clock. Cc: stable+noautosel@kernel.org # untested fix to a driver init path race Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260803135942.48383-1-mhun512@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>