From: Kunkun Jiang jiangkunkun@huawei.com
virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I61SPO CVE: NA
--------------------------------
This reverts commit 22f7a4bf1186b3f50b6716b714927e602fa32392.
Signed-off-by: Kunkun Jiang jiangkunkun@huawei.com Reviewed-by: Keqian Zhu zhukeqian1@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/vfio/pci/vfio_pci.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index ee73b1b2e200..2ff6f3ba9f39 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -557,12 +557,8 @@ static int vfio_pci_dma_fault_init(struct vfio_pci_device *vdev) return 0;
ret = iommu_domain_get_attr(domain, DOMAIN_ATTR_NESTING, &nested); - if (ret || !nested) { - if (ret) - pr_warn("%s: Get DOMAIN_ATTR_NESTING failed: %d.\n", - __func__, ret); - return 0; - } + if (ret || !nested) + return ret;
mutex_init(&vdev->fault_queue_lock);
@@ -651,12 +647,8 @@ static int vfio_pci_dma_fault_response_init(struct vfio_pci_device *vdev) return 0;
ret = iommu_domain_get_attr(domain, DOMAIN_ATTR_NESTING, &nested); - if (ret || !nested) { - if (ret) - pr_warn("%s: Get DOMAIN_ATTR_NESTING failed: %d.\n", - __func__, ret); - return 0; - } + if (ret || !nested) + return ret;
mutex_init(&vdev->fault_response_queue_lock);