aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/pci/pci.c')
-rw-r--r--src/vlib/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/pci/pci.c b/src/vlib/pci/pci.c
index dc4f382140e..1845a6211f5 100644
--- a/src/vlib/pci/pci.c
+++ b/src/vlib/pci/pci.c
@@ -302,7 +302,7 @@ _vlib_pci_link_speed (u8 *s, u8 speed, u8 width)
[1] = "2.5", [2] = "5.0", [3] = "8.0", [4] = "16.0", [5] = "32.0"
};
- if (speed > ARRAY_LEN (speeds) || speeds[speed] == 0)
+ if (speed >= ARRAY_LEN (speeds) || speeds[speed] == 0)
s = format (s, "unknown speed");
else
s = format (s, "%s GT/s", speeds[speed]);