X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ether%2Frte_ethdev.c;h=a1b744704f3a5125a5d51e75aeda82ef9ce224fa;hb=722de4c3e7b11d20f7b0c6e68e1b0ecb91fe6c43;hp=76179fd1ddcb9d22b13ff5a4bbcecbc12ef94a07;hpb=5713ade697769adec2a9070aa1e17a045a05231f;p=dpdk.git diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 76179fd1dd..a1b744704f 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -2374,6 +2374,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++)