[2/2] net/ixgbe: remove rte_panic
diff mbox series

Message ID 20201019122620.749625-3-conor.walsh@intel.com
State Superseded, archived
Delegated to: Qi Zhang
Headers show
Series
  • net/ixgbe fix unchecked return value and rte_panic
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Walsh, Conor Oct. 19, 2020, 12:26 p.m. UTC
Remove the usage of rte_panic() within ixgbe_pf_host_init()

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 4e25b1e72e..833863af5a 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -88,8 +88,11 @@  int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 		return ret;
 
 	*vfinfo = rte_zmalloc("vf_info", sizeof(struct ixgbe_vf_info) * vf_num, 0);
-	if (*vfinfo == NULL)
-		rte_panic("Cannot allocate memory for private VF data\n");
+	if (*vfinfo == NULL) {
+		PMD_INIT_LOG(ERR,
+			"Cannot allocate memory for private VF data");
+		return -ENOMEM;
+	}
 
 	ret = rte_eth_switch_domain_alloc(&(*vfinfo)->switch_domain_id);
 	if (ret) {