diff options
author | Jason Wang | 2022-04-01 04:28:24 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2022-05-13 11:22:31 +0200 |
commit | 250227f4fa4efd6032da6c39d8fb2e6c9192d6ce (patch) | |
tree | d8172299df55dbcc2279ba31bcecdac06dced276 | |
parent | virtio: fix feature negotiation for ACCESS_PLATFORM (diff) | |
download | qemu-250227f4fa4efd6032da6c39d8fb2e6c9192d6ce.tar.gz qemu-250227f4fa4efd6032da6c39d8fb2e6c9192d6ce.tar.xz qemu-250227f4fa4efd6032da6c39d8fb2e6c9192d6ce.zip |
intel-iommu: correct the value used for error_setg_errno()
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>
Message-Id: <20220401022824.9337-1-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
-rw-r--r-- | hw/i386/intel_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |