vdpa: ifcvf: Do proper cleanup if IFCVF init fails
Changes
1 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/vdpa/ifcvf/ifcvf_main.c | modified | +1 | −1 | View file |
drivers/vdpa/ifcvf/ifcvf_main.c
View filediff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index f9c0044..44b2928 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -849,7 +849,7 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
ret = ifcvf_init_hw(vf, pdev);
if (ret) {
IFCVF_ERR(pdev, "Failed to init IFCVF hw\n");
- return ret;
+ goto err;
}
for (i = 0; i < vf->nr_vring; i++)