[PATCH] igc: Fix an error handling path in 'igc_probe()'

Subsystems: intel ethernet drivers, networking drivers, the rest

STALE1880d

3 messages, 3 authors, 2021-06-22 · open the first message on its own page

[PATCH] igc: Fix an error handling path in 'igc_probe()'

From: Christophe JAILLET <hidden>
Date: 2021-06-12 20:00:18

If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: c9a11c23ceb6 ("igc: Add netdev")
Signed-off-by: Christophe JAILLET <redacted>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 3f6b6d4543a8..6389a41cacc1 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6057,6 +6057,7 @@ static int igc_probe(struct pci_dev *pdev,
 err_ioremap:
 	free_netdev(netdev);
 err_alloc_etherdev:
+	pci_disable_pcie_error_reporting(pdev);
 	pci_release_mem_regions(pdev);
 err_pci_reg:
 err_dma:
-- 
2.30.2

Re: [Intel-wired-lan] [PATCH] igc: Fix an error handling path in 'igc_probe()'

From: Fuxbrumer, Dvora <hidden>
Date: 2021-06-21 12:20:22

On 6/12/2021 23:00, Christophe JAILLET wrote:
If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: c9a11c23ceb6 ("igc: Add netdev")
Signed-off-by: Christophe JAILLET <redacted>
---
  drivers/net/ethernet/intel/igc/igc_main.c | 1 +
  1 file changed, 1 insertion(+)
Tested-by: Dvora Fuxbrumer <redacted>

Re: [PATCH] igc: Fix an error handling path in 'igc_probe()'

From: Neftin, Sasha <hidden>
Date: 2021-06-22 06:50:46

On 6/12/2021 23:00, Christophe JAILLET wrote:
quoted hunk
If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: c9a11c23ceb6 ("igc: Add netdev")
Signed-off-by: Christophe JAILLET <redacted>
---
  drivers/net/ethernet/intel/igc/igc_main.c | 1 +
  1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 3f6b6d4543a8..6389a41cacc1 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6057,6 +6057,7 @@ static int igc_probe(struct pci_dev *pdev,
  err_ioremap:
  	free_netdev(netdev);
  err_alloc_etherdev:
+	pci_disable_pcie_error_reporting(pdev);
  	pci_release_mem_regions(pdev);
  err_pci_reg:
  err_dma:
Thanks for this patch.
Acked-by: Sasha Neftin <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help