summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiong Weimin <xiongweimin@kylinos.cn>2026-08-05 09:51:52 +0800
committerMichael S. Tsirkin <mst@redhat.com>2026-09-07 18:54:02 -0400
commit4d470be71196ca0ce302e6623454533dc31b465b (patch)
tree580ff09a566b043df8a7eba3a8da10b13318316f
parente847542ab0545c73354849126150206c29d83929 (diff)
vdpa: ifcvf: Put device on unsupported feature error
Route unsupported provisioned features through the common error path after vdpa_alloc_device() so the allocated device and adapter pointer are released consistently. Fixes: 46fc0917bbab ("vDPA/ifcvf: implement features provisioning") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <178589471294.1556376.4816776800128323034@kylinos.cn>
-rw-r--r--drivers/vdpa/ifcvf/ifcvf_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index ab6d6ab3b3d8..2af1cec95884 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -724,7 +724,8 @@ static int ifcvf_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
if (config->device_features & ~device_features) {
IFCVF_ERR(pdev, "The provisioned features 0x%llx are not supported by this device with features 0x%llx\n",
config->device_features, device_features);
- return -EINVAL;
+ ret = -EINVAL;
+ goto err;
}
device_features &= config->device_features;
}