net/qede: fix dereference before null check
Coverity flags that 'fp->sb_info' variable is used before it's checked for NULL. This patch fixes this issue. Coverity issue: 260413 Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
41763024c8
commit
b5c2f5a0ba
@ -676,9 +676,9 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)
|
||||
|
||||
for (sb_idx = 0; sb_idx < QEDE_RXTX_MAX(qdev); sb_idx++) {
|
||||
fp = &qdev->fp_array[sb_idx];
|
||||
DP_INFO(edev, "Free sb_info index 0x%x\n",
|
||||
fp->sb_info->igu_sb_id);
|
||||
if (fp->sb_info) {
|
||||
DP_INFO(edev, "Free sb_info index 0x%x\n",
|
||||
fp->sb_info->igu_sb_id);
|
||||
OSAL_DMA_FREE_COHERENT(edev, fp->sb_info->sb_virt,
|
||||
fp->sb_info->sb_phys,
|
||||
sizeof(struct status_block));
|
||||
|
Loading…
x
Reference in New Issue
Block a user