On Thu, 21 May 2015 16:56:00 +0800
Cunming Liang <cunming.liang at intel.com> wrote:

> +     if (!rte_eth_dev_is_valid_port(port_id)) {
> +             PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> +             return -ENODEV;
> +     }
> +
> +     dev = &rte_eth_devices[port_id];
> +     if (dev == NULL) {
> +             PMD_DEBUG_TRACE("Invalid port device\n");
> +             return -ENODEV;
> +     }

This check is not needed, rte_eth_dev_is_valid_port already
checked that.

Reply via email to