Skip to content

Commit 2e7cee0

Browse files
John Soni JoseJames Bottomley
authored andcommitted
be2iscsi: Fix kernel panic when device initialization fails
Kernel panic was happening as iscsi_host_remove() was called on a host which was not yet added. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Odin.com>
1 parent 11e52a6 commit 2e7cee0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/scsi/be2iscsi/be_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5734,9 +5734,9 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
57345734
hba_free:
57355735
if (phba->msix_enabled)
57365736
pci_disable_msix(phba->pcidev);
5737-
iscsi_host_remove(phba->shost);
57385737
pci_dev_put(phba->pcidev);
57395738
iscsi_host_free(phba->shost);
5739+
pci_set_drvdata(pcidev, NULL);
57405740
disable_pci:
57415741
pci_disable_device(pcidev);
57425742
return ret;

0 commit comments

Comments
 (0)