scsi: cxgb4i: remove an unnecessary NULL check for 'cconn' pointer
'cconn' will never be NULL in cxgbi_conn_alloc_pdu() so remove NULL check.
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Varun Prakash <[email protected]>
--- drivers/scsi/cxgbi/libcxgbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/cxgbi/libcxgbi.c +1 -1
@@ -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;
Signature · 1 line
2.0.2
Martin K. Petersen
AppliedQuoted 2 lines · Varun Prakash
'cconn' will never be NULL in
cxgbi_conn_alloc_pdu()so remove NULL check.
Applied to 5.9/scsi-queue, thanks!
[1/1] scsi: cxgb4i: Remove an unnecessary NULL check for 'cconn' pointer
https://git.kernel.org/mkp/scsi/c/ba8ca097089b
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering