net/bnxt: add memory allocation check in VF info init
authorYunjian Wang <wangyunjian@huawei.com>
Fri, 31 Jul 2020 12:09:06 +0000 (20:09 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
commit2477be96e7a34ee74314d2604b4943b5e317e627
treed9e022806181267d879055fb0da579fbbd096e03
parent9fb9a94caf48754e7643f32a5c419007c601d9f1
net/bnxt: add memory allocation check in VF info init

The function rte_malloc() could return NULL, the return
value need to be checked.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c