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>
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));