mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ptp: ocp: unregister devlink before detach on probe error
devlink_register() runs before the dpll setup in ptp_ocp_probe(), but the failure paths after it went straight to ptp_ocp_detach() and then devlink_free(), which opens with ASSERT_DEVLINK_NOT_REGISTERED(devlink). Any dpll failure during probe therefore freed a devlink instance that was still registered. Route those paths through a new out_devlink label that unregisters first, matching the order ptp_ocp_remove() already uses. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Sagi Maimon <maimon.sagi@gmail.com> Link: https://patch.msgid.link/20260916153242.157171-2-sagi.maimon@adtran.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
c6219deaee
commit
a2bd6c1766
1 changed files with 4 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue