i40e: free skb after clearing lock in ptp_stop
Use the same logic to free the skb after clearing the Tx timestamp bit lock in i40e_ptp_stop as we use in the other locations. It is not as important here since we are not racing against a future Tx timestamp request (as we are disabling PTP at this point). However it is good to be consistent in how we approach the bit lock so that future callers don't copy the old anti-pattern. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
e3bb946cd9
commit
bdf2752305
@ -799,9 +799,11 @@ void i40e_ptp_stop(struct i40e_pf *pf)
|
||||
pf->ptp_rx = false;
|
||||
|
||||
if (pf->ptp_tx_skb) {
|
||||
dev_kfree_skb_any(pf->ptp_tx_skb);
|
||||
struct sk_buff *skb = pf->ptp_tx_skb;
|
||||
|
||||
pf->ptp_tx_skb = NULL;
|
||||
clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state);
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
|
||||
if (pf->ptp_clock) {
|
||||
|
Loading…
Reference in New Issue
Block a user