[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] intel-iommu: correct the value used for error_setg_errno()
From: |
Jason Wang |
Subject: |
[PATCH] intel-iommu: correct the value used for error_setg_errno() |
Date: |
Fri, 1 Apr 2022 10:28:24 +0800 |
error_setg_errno() expects a normal errno value, not a negated
one, so we should use ENOTSUP instead of -ENOSUP.
Fixes: Coverity CID 1487174
Fixes: ("intel_iommu: support snoop control")
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/i386/intel_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index c64aa81a83..e05d69a2c0 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3032,7 +3032,7 @@ static int
vtd_iommu_notify_flag_changed(IOMMUMemoryRegion *iommu,
/* TODO: add support for VFIO and vhost users */
if (s->snoop_control) {
- error_setg_errno(errp, -ENOTSUP,
+ error_setg_errno(errp, ENOTSUP,
"Snoop Control with vhost or VFIO is not supported");
return -ENOTSUP;
}
--
2.25.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] intel-iommu: correct the value used for error_setg_errno(),
Jason Wang <=