dect
/
linux-2.6
Archived
13
0
Fork 0

[SCSI] qla4xxx: check for failed conn setup

iscsi_conn_setup can fail so we must check for NULL being
returned.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
Mike Christie 2011-12-01 21:38:43 -06:00 committed by James Bottomley
parent e1cd89c507
commit ff1d0319ac
1 changed files with 3 additions and 0 deletions

View File

@ -1207,6 +1207,9 @@ qla4xxx_conn_create(struct iscsi_cls_session *cls_sess, uint32_t conn_idx)
DEBUG2(printk(KERN_INFO "Func: %s\n", __func__));
cls_conn = iscsi_conn_setup(cls_sess, sizeof(struct qla_conn),
conn_idx);
if (!cls_conn)
return NULL;
sess = cls_sess->dd_data;
ddb_entry = sess->dd_data;
ddb_entry->conn = cls_conn;