net/iavf: check cache pointer before dereference
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Tue, 10 Nov 2020 06:46:01 +0000 (14:46 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:26 +0000 (19:43 +0100)
commit9c70bbd88c042db24b03a6bbba3e2bf967dcd408
treed1014b5b2663963bddbee3dbe5c578526c8d13f7
parent4e61f1ac803ab508afeb47ca226b531ac22f6eb9
net/iavf: check cache pointer before dereference

The return value of rte_mempool_default_cache should be
checked as it can be NULL.

Fixes: 9ab9514c150e ("net/iavf: enable AVX512 for Tx")

Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
drivers/net/iavf/iavf_rxtx_vec_avx512.c