diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-04-06 14:19:57 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-12 03:42:43 +0300 |
commit | 1fdcd2d1da7f5293a210af52407d5024036975c2 (patch) | |
tree | e4191df3e8a27119c32e636b24b77708909021b2 /drivers/scsi/qla2xxx/qla_os.c | |
parent | bf5ea6fba78b62a4d4b70151143077131ccf32a8 (diff) | |
download | linux-1fdcd2d1da7f5293a210af52407d5024036975c2.tar.xz |
scsi: qla2xxx: remove some redundant pointer assignments
There are several local or function parameter pointers that are being
assigned NULL after a kfree where and these have no effect and hence can
be removed.
Fixes various cppcheck warnings:
"Assignment of function parameter has no effect outside the
function. Did you forget dereferencing it"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 1fed235a1b4a..9bddbcff6d8a 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -423,7 +423,6 @@ static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req) kfree(req->outstanding_cmds); kfree(req); - req = NULL; } static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp) @@ -439,7 +438,6 @@ static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp) rsp->ring, rsp->dma); } kfree(rsp); - rsp = NULL; } static void qla2x00_free_queues(struct qla_hw_data *ha) @@ -653,7 +651,6 @@ qla2x00_sp_free_dma(void *ptr) ha->gbl_dsd_inuse -= ctx1->dsd_use_cnt; ha->gbl_dsd_avail += ctx1->dsd_use_cnt; mempool_free(ctx1, ha->ctx_mempool); - ctx1 = NULL; } CMD_SP(cmd) = NULL; @@ -3235,7 +3232,6 @@ iospace_config_failed: } pci_release_selected_regions(ha->pdev, ha->bars); kfree(ha); - ha = NULL; probe_out: pci_disable_device(pdev); @@ -3482,7 +3478,6 @@ qla2x00_remove_one(struct pci_dev *pdev) pci_release_selected_regions(ha->pdev, ha->bars); kfree(ha); - ha = NULL; pci_disable_pcie_error_reporting(pdev); @@ -3546,7 +3541,6 @@ void qla2x00_free_fcports(struct scsi_qla_host *vha) list_del(&fcport->list); qla2x00_clear_loop_id(fcport); kfree(fcport); - fcport = NULL; } } |