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>
__in boolean_t skip_first,
__inout efsys_dma_addr_t *entry_offsetp)
{
- efsys_dma_addr_t offset = *entry_offsetp;
+ efsys_dma_addr_t offset;
boolean_t skip = skip_first;
efx_qword_t header;
uint32_t format;
goto fail1;
}
+ offset = *entry_offsetp;
rc = ENOENT;
/*
* SF-119689-TC Riverhead Host Interface section 4.2.2.