]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[SCSI] qla4xxx: check for failed conn setup
authorMike Christie <michaelc@cs.wisc.edu>
Fri, 2 Dec 2011 03:38:43 +0000 (21:38 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 14 Dec 2011 11:40:44 +0000 (15:40 +0400)
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>
drivers/scsi/qla4xxx/ql4_os.c

index 95910c9b47765b94c0cce88d5756c693c0442368..4169c8baa112a41266b4a05335290f7b1fdf90fd 100644 (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;