ethdev: fix build with icc

This patch fixes following errors with icc.
  error #188: enumerated type mixed with another type
    return -1;

Fixes: 92d94d3744d7 ("ethdev: attach or detach port")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
This commit is contained in:
Tetsuya Mukawa 2015-02-27 14:20:34 +09:00 committed by Thomas Monjalon
parent a8e3219a92
commit 911920812f

View File

@ -433,7 +433,7 @@ static enum rte_eth_dev_type
rte_eth_dev_get_device_type(uint8_t port_id)
{
if (!rte_eth_dev_is_valid_port(port_id))
return -1;
return RTE_ETH_DEV_UNKNOWN;
return rte_eth_devices[port_id].dev_type;
}