diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-09-11 12:09:37 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-14 12:00:54 -0700 |
| commit | 9a1d6fa0012dc998ceebab64bd6cb95e807185d3 (patch) | |
| tree | 7f686958b1f21edb12d7c2189fbf841a0b86400d /rust/helpers/io.c | |
| parent | 9c0d0fa8d4a8719adbe68108ebc9cd723cfa4493 (diff) | |
net: stmmac: ptp: improve handling of aux_ts_lock lifetime
The aux_ts_lock mutex is only required while the PTP clock has been
successfully registered.
stmmac_ptp_register() does not return any errors (as we don't wish to
prevent the netdev being opened if PTP fails), stmmac_ptp_unregister()
was coded to allow it to be called irrespective of whether PTP was
successfully registered or not.
Arrange for the aux_ts_lock mutex to be destroyed if the PTP clock
is not functional during stmmac_ptp_register(), and only destroy it
in stmmac_ptp_unregister() if we had a PTP clock registered.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/io.c')
0 files changed, 0 insertions, 0 deletions
