From 7966fcd39b45dd020de427734196693540f6ce93 Mon Sep 17 00:00:00 2001 From: Conor Walsh Date: Tue, 20 Oct 2020 10:02:48 +0000 Subject: [PATCH] net/ixgbe: prevent driver forcing application to exit Remove the usage of rte_panic() within ixgbe_pf_host_init() Signed-off-by: Conor Walsh Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_pf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) { -- 2.20.1