[SCSI] be2iscsi: fix null dereference on error path
authorDan Carpenter <error27@gmail.com>
Thu, 10 Jun 2010 07:53:05 +0000 (09:53 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:01:41 +0000 (12:01 -0500)
"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>
drivers/scsi/be2iscsi/be_main.c

index 353a90b..0d35bf6 100644 (file)
@@ -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;
        }