Add NULL parameter check for rte_eth_dev_allocated() API call to
eth_ixgbe_pci_probe().
Coverity Issue: 277216
Fixes:
cf80ba6e2038 ("net/ixgbe: add support for representor ports")
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
if (retval || eth_da.nb_representor_ports < 1)
return retval;
- /* probe VF representor ports */
pf_ethdev = rte_eth_dev_allocated(pci_dev->device.name);
+ if (pf_ethdev == NULL)
+ return -ENODEV;
+ /* probe VF representor ports */
for (i = 0; i < eth_da.nb_representor_ports; i++) {
struct ixgbe_vf_info *vfinfo;
struct ixgbe_vf_representor representor;