summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2020-07-14 21:19:11 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-15 16:06:41 -0400
commitba8ca097089b1372d36d5b789c231b6c2c797d31 (patch)
tree1b40856d69bc81cf217620dcd9cf212e3bee32b5 /drivers/scsi/cxgbi
parentbc2736e98e02097ec0e1245b7facf7c8ebec550c (diff)
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.com Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 4c555844b7eb..932dbd4c4cca 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -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 cxgbi_conn *cconn = tcp_conn->dd_data;
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 cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
struct scsi_cmnd *sc = task->sc;