vfio: remove unneeded test
clang complained that the comparison of an u8 variable against 256 is
somewhat pointless.
Just remove the check, as the condition will never hit.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
diff --git a/vfio/pci.c b/vfio/pci.c
index 10aa87b..a408632 100644
--- a/vfio/pci.c
+++ b/vfio/pci.c
@@ -557,11 +557,6 @@
pdev->hdr.capabilities = 0;
for (; pos; pos = next) {
- if (pos >= PCI_DEV_CFG_SIZE) {
- vfio_dev_warn(vdev, "ignoring cap outside of config space");
- return -EINVAL;
- }
-
cap = PCI_CAP(&pdev->hdr, pos);
next = cap->next;