[PATCH] net: txgbe: Fix an error handling path in txgbe_probe()

Christophe JAILLET posted 1 patch 3 years, 8 months ago
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] net: txgbe: Fix an error handling path in txgbe_probe()
Posted by Christophe JAILLET 3 years, 8 months ago
A pci_enable_pcie_error_reporting() should be balanced by a corresponding
pci_disable_pcie_error_reporting() call in the error handling path, as
already done in the remove function.

Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
index 55c3c720b377..d3b9f73ecba4 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
@@ -123,6 +123,7 @@ static int txgbe_probe(struct pci_dev *pdev,
 	return 0;
 
 err_pci_release_regions:
+	pci_disable_pcie_error_reporting(pdev);
 	pci_release_selected_regions(pdev,
 				     pci_select_bars(pdev, IORESOURCE_MEM));
 err_pci_disable_dev:
-- 
2.34.1
Re: [PATCH] net: txgbe: Fix an error handling path in txgbe_probe()
Posted by patchwork-bot+netdevbpf@kernel.org 3 years, 8 months ago
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 31 Jul 2022 18:34:15 +0200 you wrote:
> A pci_enable_pcie_error_reporting() should be balanced by a corresponding
> pci_disable_pcie_error_reporting() call in the error handling path, as
> already done in the remove function.
> 
> Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> [...]

Here is the summary with links:
  - net: txgbe: Fix an error handling path in txgbe_probe()
    https://git.kernel.org/netdev/net-next/c/2e8f205d910e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html