X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fethtool%2Flib%2Frte_ethtool.c;h=667d7eaf27496dba993c7913a814d501c4d29c47;hb=b50bcefdcc087e3b945c05ddbe8f0dff399ff405;hp=8393b0d609d5dfd375c550ef1ac1439b56cb7ef5;hpb=22e5c73bd181ddae758189295146154542b63360;p=dpdk.git diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index 8393b0d609..667d7eaf27 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -314,10 +314,15 @@ rte_ethtool_net_stop(uint16_t port_id) int rte_ethtool_net_get_mac_addr(uint16_t port_id, struct rte_ether_addr *addr) { + int ret; + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); if (addr == NULL) return -EINVAL; - rte_eth_macaddr_get(port_id, addr); + + ret = rte_eth_macaddr_get(port_id, addr); + if (ret != 0) + return ret; return 0; }