From: Mike Christie Date: Fri, 2 Dec 2011 03:38:43 +0000 (-0600) Subject: [SCSI] qla4xxx: check for failed conn setup X-Git-Tag: v3.2-rc7~42^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff1d0319ac6a5fd859884b30c0a3cb6733b8fb2d;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 95910c9..4169c8b 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -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;