Commit ba8ca097 authored by Varun Prakash's avatar Varun Prakash Committed by Martin K. Petersen

scsi: cxgb4i: Remove an unnecessary NULL check for 'cconn' pointer

'cconn' will never be NULL in cxgbi_conn_alloc_pdu() so remove NULL check.

Link: https://lore.kernel.org/r/1594741751-3323-1-git-send-email-varun@chelsio.comReported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarVarun Prakash <varun@chelsio.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bc2736e9
...@@ -1889,7 +1889,7 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 op) ...@@ -1889,7 +1889,7 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 op)
struct iscsi_tcp_conn *tcp_conn = conn->dd_data; struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
struct cxgbi_conn *cconn = tcp_conn->dd_data; struct cxgbi_conn *cconn = tcp_conn->dd_data;
struct cxgbi_device *cdev = cconn->chba->cdev; struct cxgbi_device *cdev = cconn->chba->cdev;
struct cxgbi_sock *csk = (cconn && cconn->cep) ? cconn->cep->csk : NULL; struct cxgbi_sock *csk = cconn->cep ? cconn->cep->csk : NULL;
struct iscsi_tcp_task *tcp_task = task->dd_data; struct iscsi_tcp_task *tcp_task = task->dd_data;
struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
struct scsi_cmnd *sc = task->sc; struct scsi_cmnd *sc = task->sc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment