public inbox for intel-wired-lan@osuosl.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP upon probe failure
@ 2026-04-04 15:19 Matt Vollrath
  2026-04-05 17:03 ` Kohei Enju
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Vollrath @ 2026-04-04 15:19 UTC (permalink / raw)
  To: intel-wired-lan

Fix two conditions which would leak PTP registration on probe failure:

1. i40e_setup_pf_switch can encounter an error in
    i40e_setup_pf_filter_control, call i40e_ptp_init, then return
    non-zero, sending i40e_probe to err_vsis.

2. i40e_setup_misc_vector can return non-zero, sending i40e_probe to
    err_vsis.

Found with coccinelle.

Signed-off-by: Matt Vollrath <tactii@gmail.com>
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 598739220dfb..dacdf5fad2ea 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -16112,6 +16112,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  	/* Unwind what we've done if something failed in the setup */
  err_vsis:
  	set_bit(__I40E_DOWN, pf->state);
+	i40e_ptp_stop(pf);
  	i40e_clear_interrupt_scheme(pf);
  	kfree(pf->vsi);
  err_switch_setup:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-05 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-04 15:19 [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP upon probe failure Matt Vollrath
2026-04-05 17:03 ` Kohei Enju
2026-04-05 17:31   ` Matt Vollrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox