diff mbox series

[1/2] scsi: be2iscsi: Fix an error handling path in 'beiscsi_dev_probe()'

Message ID 77adb02cfea7f1364e5603ecf3930d8597ae356e.1623482155.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Headers show
Series [1/2] scsi: be2iscsi: Fix an error handling path in 'beiscsi_dev_probe()' | expand

Commit Message

Christophe JAILLET June 12, 2021, 7:18 a.m. UTC
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: 3567f36a09d1 ("[SCSI] be2iscsi: Fix AER handling in driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/be2iscsi/be_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin K. Petersen June 23, 2021, 2:19 a.m. UTC | #1
Christophe,

> 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.

Applied to 5.14/scsi-staging, thanks!
Martin K. Petersen June 29, 2021, 4:10 a.m. UTC | #2
On Sat, 12 Jun 2021 09:18:34 +0200, 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.

Applied to 5.14/scsi-queue, thanks!

[1/2] scsi: be2iscsi: Fix an error handling path in 'beiscsi_dev_probe()'
      https://git.kernel.org/mkp/scsi/c/030e4138d11f
[2/2] scsi: be2iscsi: Fix some missing space in some messages (+some extra style issues)
      https://git.kernel.org/mkp/scsi/c/c7fa2c855e89
diff mbox series

Patch

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 310b801c6c87..b89a7db477c7 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5743,6 +5743,7 @@  static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	pci_disable_msix(phba->pcidev);
 	pci_dev_put(phba->pcidev);
 	iscsi_host_free(phba->shost);
+	pci_disable_pcie_error_reporting(pcidev);
 	pci_set_drvdata(pcidev, NULL);
 disable_pci:
 	pci_release_regions(pcidev);