Skip to content

Commit

Permalink
net/ixgbe: prevent driver forcing application to exit
Browse files Browse the repository at this point in the history
Remove the usage of rte_panic() within ixgbe_pf_host_init()

Signed-off-by: Conor Walsh <[email protected]>
Acked-by: Haiyue Wang <[email protected]>
  • Loading branch information
conorwalsh-intel authored and Ferruh Yigit committed Nov 3, 2020
1 parent c2c5231 commit 7966fcd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ixgbe/ixgbe_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7966fcd

Please sign in to comment.