summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNicolin Chen <nicolinc@nvidia.com>2025-10-14 14:48:46 -0700
committerJason Gunthorpe <jgg@nvidia.com>2025-10-20 20:01:23 -0300
commitb09ed52db1e688eb8205b1939ca1345179ecd515 (patch)
treee1a9b30c4bf413f51408cee867cafdf6d71e98a0 /tools
parentcb30dfa75d55eced379a42fd67bd5fb7ec38555e (diff)
iommufd/selftest: Fix ioctl return value in _test_cmd_trigger_vevents()
The ioctl returns 0 upon success, so !0 returning -1 breaks the selftest. Drop the '!' to fix it. Fixes: 1d235d849425 ("iommu/selftest: prevent use of uninitialized variable") Link: https://patch.msgid.link/r/20251014214847.1113759-1-nicolinc@nvidia.com Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/iommu/iommufd_utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/iommu/iommufd_utils.h b/tools/testing/selftests/iommu/iommufd_utils.h
index 772ca1db6e59..9f472c20c190 100644
--- a/tools/testing/selftests/iommu/iommufd_utils.h
+++ b/tools/testing/selftests/iommu/iommufd_utils.h
@@ -1044,8 +1044,8 @@ static int _test_cmd_trigger_vevents(int fd, __u32 dev_id, __u32 nvevents)
};
while (nvevents--) {
- if (!ioctl(fd, _IOMMU_TEST_CMD(IOMMU_TEST_OP_TRIGGER_VEVENT),
- &trigger_vevent_cmd))
+ if (ioctl(fd, _IOMMU_TEST_CMD(IOMMU_TEST_OP_TRIGGER_VEVENT),
+ &trigger_vevent_cmd))
return -1;
}
return 0;