Skip to content

Commit

Permalink
[SCSI] be2iscsi: fix null dereference on error path
Browse files Browse the repository at this point in the history
"phba" is always null here so we can't dereference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Jul 27, 2010
1 parent 1462b8f commit 82284c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/be2iscsi/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3774,8 +3774,8 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,

ret = beiscsi_enable_pci(pcidev);
if (ret < 0) {
shost_printk(KERN_ERR, phba->shost, "beiscsi_dev_probe-"
"Failed to enable pci device \n");
dev_err(&pcidev->dev, "beiscsi_dev_probe-"
" Failed to enable pci device\n");
return ret;
}

Expand Down

0 comments on commit 82284c0

Please sign in to comment.