net/ixgbe: check switch domain allocation result
authorConor Walsh <conor.walsh@intel.com>
Tue, 20 Oct 2020 10:02:47 +0000 (10:02 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:26 +0000 (23:24 +0100)
commitc2c523189634c54cb99ce452a14c46d02cc4d2de
tree2869d2403012d8da11559724507e317abe9be69f
parent0f8f35a26a974e5510cec1ca6297537d07e3e782
net/ixgbe: check switch domain allocation result

The return value of rte_eth_switch_domain_alloc() was not being checked
within ixgbe_pf_host_init() which caused a coverity issue. If the call
fails a warning is logged using PMD_INIT_LOG() and *vfinfo is free'd.
ixgbe_pf_host_init() now has a return value which is checked in
eth_ixgbe_dev_init()

Coverity issue: 362795
Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
Cc: stable@dpdk.org
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/ixgbe/ixgbe_ethdev.h
drivers/net/ixgbe/ixgbe_pf.c