diff options
author | Andre Przywara <andre.przywara@arm.com> | 2019-05-03 18:15:42 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-05-29 15:54:14 +0100 |
commit | 1ac5dce983fe043ad2d3432cd00a25782a89217b (patch) | |
tree | 4e90608bbc256f80785263c1eee5bd3d7312c564 | |
parent | 09533d3ccdfefc469e85bab313f4b0067bcc565f (diff) | |
download | kvmtool-1ac5dce983fe043ad2d3432cd00a25782a89217b.tar.gz |
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>
-rw-r--r-- | vfio/pci.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -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; |