Skip to content
Commit f56ba2d4 authored by Reinette Chatre's avatar Reinette Chatre Committed by Greg Kroah-Hartman
Browse files

vfio/pci: Remove negative check on unsigned vector

[ Upstream commit 6578ed85

 ]

User space provides the vector as an unsigned int that is checked
early for validity (vfio_set_irqs_validate_and_prepare()).

A later negative check of the provided vector is not necessary.

Remove the negative check and ensure the type used
for the vector is consistent as an unsigned int.

Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/28521e1b0b091849952b0ecb8c118729fc8cdc4f.1683740667.git.reinette.chatre@intel.com
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Stable-dep-of: fe9a7082

 ("vfio/pci: Disable auto-enable of exclusive INTx IRQ")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent dcc6b99c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment