Skip to content

Commit e250bd2

Browse files
Tom Rixmartinkpetersen
authored andcommitted
scsi: qla2xxx: 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1fcbe4c commit e250bd2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/scsi/qla2xxx/qla_mid.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ qla25xx_free_req_que(struct scsi_qla_host *vha, struct req_que *req)
591591
}
592592
kfree(req->outstanding_cmds);
593593
kfree(req);
594-
req = NULL;
595594
}
596595

597596
static void
@@ -617,7 +616,6 @@ qla25xx_free_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
617616
mutex_unlock(&ha->vport_lock);
618617
}
619618
kfree(rsp);
620-
rsp = NULL;
621619
}
622620

623621
int

0 commit comments

Comments
 (0)