]> www.infradead.org Git - users/hch/misc.git/commitdiff
igc: cleanup PTP module if probe fails
authorChristopher S M Hall <christopher.s.hall@intel.com>
Tue, 1 Apr 2025 23:35:33 +0000 (16:35 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 11 Apr 2025 16:13:28 +0000 (09:13 -0700)
Make sure that the PTP module is cleaned up if the igc_probe() fails by
calling igc_ptp_stop() on exit.

Fixes: d89f88419f99 ("igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support")
Signed-off-by: Christopher S M Hall <christopher.s.hall@intel.com>
Reviewed-by: Corinna Vinschen <vinschen@redhat.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c

index f1330379e6bbc558c795129a2c5a7ab751f01355..b1669d7cf4359138b9bab1e2a6cbd5e7806d7708 100644 (file)
@@ -7231,6 +7231,7 @@ static int igc_probe(struct pci_dev *pdev,
 
 err_register:
        igc_release_hw_control(adapter);
+       igc_ptp_stop(adapter);
 err_eeprom:
        if (!igc_check_reset_block(hw))
                igc_reset_phy(hw);