summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2010-07-23 15:28:30 +0500
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 09:06:11 -0500
commit8867048b486a64125b62f93af13a379d6d575ee2 (patch)
tree72bd8422dddba119d0b90831cbe8d6441d0b189f /drivers/scsi/qla2xxx/qla_attr.c
parent14e303d98bcfe4a6075407b531b1df2f237deb28 (diff)
[SCSI] qla2xxx: Add qla2x00_free_fcports() function
This function was added to encapsulate freeing the memory for all the fcports associated with a particular vha. Also added a call to qla2x00_free_fcports() to qla2x00_free_device() to free the memory for all the fcports associated with a vha during device removal. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 7ebf365043cf..93a4c20e2113 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1827,7 +1827,6 @@ static int
qla24xx_vport_delete(struct fc_vport *fc_vport)
{
scsi_qla_host_t *vha = fc_vport->dd_data;
- fc_port_t *fcport, *tfcport;
struct qla_hw_data *ha = vha->hw;
uint16_t id = vha->vp_idx;
@@ -1841,11 +1840,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
scsi_remove_host(vha->host);
- list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) {
- list_del(&fcport->list);
- kfree(fcport);
- fcport = NULL;
- }
+ qla2x00_free_fcports(vha);
qla24xx_deallocate_vp_id(vha);