summaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
authorLongfang Liu <liulongfang@huawei.com>2022-09-26 11:33:28 +0200
committerAlex Williamson <alex.williamson@redhat.com>2022-09-27 17:30:31 +0200
commit948f5ada58b552d975d1937a3f5939414f28cacb (patch)
treed4ccc14c4ed8e290d969f80321750e5237c90730 /drivers/vfio
parentvfio: Follow a strict lifetime for struct iommu_group (diff)
downloadlinux-948f5ada58b552d975d1937a3f5939414f28cacb.tar.xz
linux-948f5ada58b552d975d1937a3f5939414f28cacb.zip
hisi_acc_vfio_pci: Fixes error return code issue
During the process of compatibility and matching of live migration device information, if the isolation status of the two devices is inconsistent, the live migration needs to be exited. The current driver does not return the error code correctly and needs to be fixed. Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Link: https://lore.kernel.org/r/20220926093332.28824-2-liulongfang@huawei.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
index 47174e2b61bd..4ef9761ef467 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -397,7 +397,7 @@ static int vf_qm_check_match(struct hisi_acc_vf_core_device *hisi_acc_vdev,
if (vf_data->que_iso_cfg != que_iso_state) {
dev_err(dev, "failed to match isolation state\n");
- return ret;
+ return -EINVAL;
}
ret = qm_write_regs(vf_qm, QM_VF_STATE, &vf_data->vf_qm_state, 1);