Skip to content

Commit

Permalink
netxen_nic: Fix an error handling path in 'netxen_nic_probe()'
Browse files Browse the repository at this point in the history
[ Upstream commit 49a10c7 ]

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: e87ad55 ("netxen: support pci error handlers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jun 23, 2021
1 parent 70513cd commit d708e5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
Expand Up @@ -1602,6 +1602,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
free_netdev(netdev);

err_out_free_res:
if (NX_IS_REVISION_P3(pdev->revision))
pci_disable_pcie_error_reporting(pdev);
pci_release_regions(pdev);

err_out_disable_pdev:
Expand Down

0 comments on commit d708e5e

Please sign in to comment.