diff options
author | Quinn Tran <qutran@marvell.com> | 2019-12-17 23:06:10 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-12-20 04:42:45 +0100 |
commit | 3dae220595baa7a9fb582b851b54c10ad6a0cbae (patch) | |
tree | a39fe131ff3bcd5453b0ca4f23d7413eec8f1c41 /drivers/scsi/qla2xxx/qla_bsg.c | |
parent | scsi: qla2xxx: Add D-Port Diagnostic reason explanation logs (diff) | |
download | linux-3dae220595baa7a9fb582b851b54c10ad6a0cbae.tar.xz linux-3dae220595baa7a9fb582b851b54c10ad6a0cbae.zip |
scsi: qla2xxx: Use common routine to free fcport struct
This patch does not change any any functionality.
Link: https://lore.kernel.org/r/20191217220617.28084-8-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_bsg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index cbaf178fc979..2b3702b20c94 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -54,7 +54,8 @@ void qla2x00_bsg_sp_free(srb_t *sp) if (sp->type == SRB_CT_CMD || sp->type == SRB_FXIOCB_BCMD || sp->type == SRB_ELS_CMD_HST) - kfree(sp->fcport); + qla2x00_free_fcport(sp->fcport); + qla2x00_rel_sp(sp); } @@ -405,7 +406,7 @@ done_unmap_sg: done_free_fcport: if (bsg_request->msgcode == FC_BSG_RPT_ELS) - kfree(fcport); + qla2x00_free_fcport(fcport); done: return rval; } @@ -545,7 +546,7 @@ qla2x00_process_ct(struct bsg_job *bsg_job) return rval; done_free_fcport: - kfree(fcport); + qla2x00_free_fcport(fcport); done_unmap_sg: dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); @@ -2049,7 +2050,7 @@ qlafx00_mgmt_cmd(struct bsg_job *bsg_job) return rval; done_free_fcport: - kfree(fcport); + qla2x00_free_fcport(fcport); done_unmap_rsp_sg: if (piocb_rqst->flags & SRB_FXDISC_RESP_DMA_VALID) |