Blob Blame History Raw
From: Tom Rix <trix@redhat.com>
Date: Sat, 21 May 2022 16:16:07 -0400
Subject: scsi: qla2xxx: Remove setting of 'req' and 'rsp' parameters
Patch-mainline: v5.19-rc1
Git-commit: e250bd2699e0e7418cd54ea2a762acfcfad43ffd
References: bsc#1201958

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 <himanshu.madhani@oracle.com>
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/qla2xxx/qla_mid.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -592,7 +592,6 @@ qla25xx_free_req_que(struct scsi_qla_hos
 	}
 	kfree(req->outstanding_cmds);
 	kfree(req);
-	req = NULL;
 }
 
 static void
@@ -618,7 +617,6 @@ qla25xx_free_rsp_que(struct scsi_qla_hos
 		mutex_unlock(&ha->vport_lock);
 	}
 	kfree(rsp);
-	rsp = NULL;
 }
 
 int