aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_ether/rte_ethdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_ether/rte_ethdev.c')
-rw-r--r--lib/librte_ether/rte_ethdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 83898a8f..2d442a9b 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2351,6 +2351,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
struct rte_eth_dev *dev = &rte_eth_devices[port_id];
unsigned i;
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
rte_eth_dev_info_get(port_id, &dev_info);
for (i = 0; i < dev_info.max_mac_addrs; i++)