[patch 2/2] be2iscsi: null dereference on error path

Dan Carpenter
2010-06-10T07:53:05Z

"phba" is always null here so we can't dereference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 779e1d1..efadde9 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -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;
}