diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-06-23 10:02:00 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-10-12 17:27:11 +0300 |
commit | fd80d3feb67a7845cbed3df9557ae27ba3afe189 (patch) | |
tree | 153b8d423d8e5ff8b52ff4e180f95896fed528a5 /drivers | |
parent | 86c459a0e490e396d4fc920625519263dc37d4d7 (diff) | |
download | linux-fd80d3feb67a7845cbed3df9557ae27ba3afe189.tar.xz |
scsi: bnx2i: missing error code in bnx2i_ep_connect()
commit 1d32a62c74b3bcb69822b0f4745af5410cfec3a7 upstream.
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: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index d1e697190970..d52c3c47ceef 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -1894,7 +1894,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); |