提交 1d32a62c 编写于 作者: D Dan Carpenter 提交者: Martin K. Petersen

scsi: bnx2i: missing error code in bnx2i_ep_connect()

If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead of
an error pointer.  It results in a NULL dereference in
iscsi_if_ep_connect().

Fixes: cf4e6363 ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 06d9eb4e
......@@ -1909,7 +1909,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost,
bnx2i_ep_active_list_add(hba, bnx2i_ep);
if (bnx2i_map_ep_dbell_regs(bnx2i_ep))
rc = bnx2i_map_ep_dbell_regs(bnx2i_ep);
if (rc)
goto del_active_ep;
mutex_unlock(&hba->net_dev_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册