From 4b5e61abda2a93ea3a3c3eec882ddbcafb99efd1 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 15 Jun 2022 20:15:58 +0300 Subject: [PATCH] qla2x00t-32gbit: Remove setting of 'req' and 'rsp' parameters cppcheck reports [drivers/scsi/qla2xxx/qla_mid.c:594]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [drivers/scsi/qla2xxx/qla_mid.c:620]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? The functions qla25xx_free_req_que() and qla25xx_free_rsp_que() are similar. They free a 'req' and a 'rsp' parameter respectively. The last statement of both functions is setting the parameter to NULL. This has no effect and can be removed. Link: https://lore.kernel.org/r/20220521201607.4145298-1-trix@redhat.com Reviewed-by: Himanshu Madhani Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen [ commit e250bd2699e0 upstream ] --- qla2x00t-32gbit/qla_mid.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/qla2x00t-32gbit/qla_mid.c b/qla2x00t-32gbit/qla_mid.c index e6b5c4ccc..346d47b61 100644 --- a/qla2x00t-32gbit/qla_mid.c +++ b/qla2x00t-32gbit/qla_mid.c @@ -591,7 +591,6 @@ qla25xx_free_req_que(struct scsi_qla_host *vha, struct req_que *req) } kfree(req->outstanding_cmds); kfree(req); - req = NULL; } static void @@ -617,7 +616,6 @@ qla25xx_free_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) mutex_unlock(&ha->vport_lock); } kfree(rsp); - rsp = NULL; } int