Commit 1ac5dce9 authored by Andre Przywara's avatar Andre Przywara Committed by Will Deacon
Browse files

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's avatarAndre Przywara <andre.przywara@arm.com>
Reviewed-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 09533d3c
......@@ -557,11 +557,6 @@ static int vfio_pci_parse_caps(struct vfio_device *vdev)
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;
......
Supports Markdown
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