ethdev: fix build with gcc 5.4.0
ethdev: fix build with gcc 5.4.0

Seen on Ubuntu 16.04 with GCC 5.4.0:

lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index':
lib/librte_ether/rte_ethdev.c:2369:26: error:
'dev_info.max_mac_addrs' may be used uninitialized in this function

Indeed, rte_eth_dev_info_get() do not write into dev_info
if the port_id is not valid.
So we need to check the port_id and return in case of error.

This extra check should not be needed because the port_id is always
checked before calling get_mac_addr_index().
However it does not hurt.

Reported-by: Matan Azrad <6969f5f553ad7652679a585a85d7321babc90464@mellanox.com>
Signed-off-by: Thomas Monjalon <5f50a84c1fa3bcff146405017f36aec1a10a9e38@monjalon.net>
Tested-by: Matan Azrad <6969f5f553ad7652679a585a85d7321babc90464@mellanox.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk