common/sfc_efx/base: fix dereferencing null pointer
authorHongbo Zheng <zhenghongbo3@huawei.com>
Sun, 25 Apr 2021 12:58:16 +0000 (20:58 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 27 Apr 2021 15:21:33 +0000 (17:21 +0200)
commit3de9af2aaa680b33a9a597b8ec4d76163dee2029
tree82f46b451ce7360e261916bfd9406127fa5ef6d4
parentfae9b062b01397339c02c88ebee11dd5f7af3e3c
common/sfc_efx/base: fix dereferencing null pointer

In function efx_pci_xilinx_cap_tbl_find, pointer entry_offsetp is used
before null pointer check, which may cause access to null pointer.

This patch fix this problem.

Fixes: ba9568b8b4b7 ("common/sfc_efx/base: add Xilinx capabilities table lookup")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/common/sfc_efx/base/efx_pci.c