]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_ether/rte_ethdev.c
ethdev: fix build with gcc 5.4.0
[dpdk.git] / lib / librte_ether / rte_ethdev.c
index 76179fd1ddcb9d22b13ff5a4bbcecbc12ef94a07..a1b744704f3a5125a5d51e75aeda82ef9ce224fa 100644 (file)
@@ -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++)