diff options
Diffstat (limited to 'drivers/net/ark/ark_pktgen.c')
-rw-r--r-- | drivers/net/ark/ark_pktgen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 8c7a8a2d..018f37b6 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -110,6 +110,10 @@ ark_pktgen_init(void *adr, int ord, int l2_mode) struct ark_pkt_gen_inst *inst = rte_malloc("ark_pkt_gen_inst_pmd", sizeof(struct ark_pkt_gen_inst), 0); + if (inst == NULL) { + PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n"); + return inst; + } inst->regs = (struct ark_pkt_gen_regs *)adr; inst->ordinal = ord; inst->l2_mode = l2_mode; |