diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2023-06-12 18:14:18 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-03 19:15:12 +0300 |
commit | 7712832201eadb871c15ed96be1ec60d1e3ecacf (patch) | |
tree | 224caaba9aed3eb39f6bdb1b1ed26379b57b137a /drivers/vdpa/ifcvf/ifcvf_main.c | |
parent | bc9a2b3e686e32ebd764d92e66e21c01e23ffb16 (diff) | |
download | linux-7712832201eadb871c15ed96be1ec60d1e3ecacf.tar.xz |
vDPA/ifcvf: dynamic allocate vq data stores
This commit dynamically allocates the data
stores for the virtqueues based on
virtio_pci_common_cfg.num_queues.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Message-Id: <20230612151420.1019504-2-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_main.c')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 6e47ac2c669a..2af0de771b49 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -830,6 +830,7 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; err: + kfree(ifcvf_mgmt_dev->vf.vring); kfree(ifcvf_mgmt_dev); return ret; } @@ -840,6 +841,7 @@ static void ifcvf_remove(struct pci_dev *pdev) ifcvf_mgmt_dev = pci_get_drvdata(pdev); vdpa_mgmtdev_unregister(&ifcvf_mgmt_dev->mdev); + kfree(ifcvf_mgmt_dev->vf.vring); kfree(ifcvf_mgmt_dev); } |