Skip to content

Commit

Permalink
net/nfp: fix switch domain free check
Browse files Browse the repository at this point in the history
[ upstream commit 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e ]

CI found calling 'rte_eth_switch_domain_free()' without checking return
value.

Coverity issue: 414936
Fixes: 20eaa8e2ebae ("net/nfp: free switch domain ID on close")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
  • Loading branch information
hechaoyong authored and bluca committed Mar 18, 2024
1 parent c5251ed commit 75b8660
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/nfp/flower/nfp_flower.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
nfp_cpp_area_free(pf_dev->ctrl_area);
rte_free(app_fw_flower->pf_hw);
nfp_flow_priv_uninit(pf_dev);
rte_eth_switch_domain_free(app_fw_flower->switch_domain_id);
if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0)
PMD_DRV_LOG(WARNING, "Failed to free switch domain for device");
rte_free(app_fw_flower);
}

Expand Down

0 comments on commit 75b8660

Please sign in to comment.