On Thu, Oct 16, 2025 at 07:47:20AM +0000, Tian, Kevin wrote:
From: Nicolin Chen nicolinc@nvidia.com Sent: Wednesday, October 15, 2025 5:49 AM
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") Signed-off-by: Nicolin Chen nicolinc@nvidia.com
Reviewed-by: Kevin Tian kevin.tian@intel.com
With this fix a positive value returned by the ioctl() ends the loop and returns -1 to the assert. Maybe better to put ioctl()<0 in the if condition?