提交 82284c09 编写于 作者: D Dan Carpenter 提交者: James Bottomley

[SCSI] be2iscsi: fix null dereference on error path

"phba" is always null here so we can't dereference it.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 1462b8ff
...@@ -3774,8 +3774,8 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev, ...@@ -3774,8 +3774,8 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,
ret = beiscsi_enable_pci(pcidev); ret = beiscsi_enable_pci(pcidev);
if (ret < 0) { if (ret < 0) {
shost_printk(KERN_ERR, phba->shost, "beiscsi_dev_probe-" dev_err(&pcidev->dev, "beiscsi_dev_probe-"
"Failed to enable pci device \n"); " Failed to enable pci device\n");
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册