aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2019-05-03 18:15:42 +0100
committerWill Deacon <will.deacon@arm.com>2019-05-29 15:54:14 +0100
commit1ac5dce983fe043ad2d3432cd00a25782a89217b (patch)
tree4e90608bbc256f80785263c1eee5bd3d7312c564
parent09533d3ccdfefc469e85bab313f4b0067bcc565f (diff)
downloadkvmtool-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.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/vfio/pci.c b/vfio/pci.c
index 10aa87b1..a4086326 100644
--- a/vfio/pci.c
+++ b/vfio/pci.c
@@ -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;