nfp: flower: correction of error handling
Subsystems (3)
PATCH 1/1 nfp: flower: correction of error handling
From: Yu Xiao <[email protected]>
Removing reduplicated error handling when running into error path of nfp_compile_flow_metadata.
Signed-off-by Yu Xiao <[email protected]>
Signed-off-by Yinjun Zhang <[email protected]>
Signed-off-by Simon Horman <[email protected]>
--- .../ethernet/netronome/nfp/flower/metadata.c | 20 ------------------- 1 file changed, 20 deletions(-)
drivers/net/ethernet/netronome/nfp/flower/metadata.c +0 -20
@@ -338,11 +338,6 @@ int nfp_compile_flow_metadata(struct nfp_app *app, u32 cookie, nfp_flow->meta.mask_len, &nfp_flow->meta.flags, &new_mask_id)) {NL_SET_ERR_MSG_MOD (extack,"invalid entry: cannot allocate a new mask id" ); -if (nfp_release_stats_entry (app, stats_cxt)) { -NL_SET_ERR_MSG_MOD (extack,"invalid entry: cannot release stats context" ); - err = -EINVAL ; - goto err_remove_rhash; - } err = -ENOENT ; goto err_remove_rhash; }
@@ -359,21 +354,6 @@ int nfp_compile_flow_metadata(struct nfp_app *app, u32 cookie, check_entry =nfp_flower_search_fl_table (app, cookie, netdev);if (check_entry) {NL_SET_ERR_MSG_MOD (extack,"invalid entry: cannot offload duplicate flow entry" ); -if (nfp_release_stats_entry (app, stats_cxt)) { -NL_SET_ERR_MSG_MOD (extack,"invalid entry: cannot release stats context" ); - err = -EINVAL ; - goto err_remove_mask; - } - -if (!nfp_flow->pre_tun_rule.dev && - !nfp_check_mask_remove (app, nfp_flow->mask_data, - nfp_flow->meta.mask_len, -NULL , &new_mask_id)) { -NL_SET_ERR_MSG_MOD (extack,"invalid entry: cannot release mask id" ); - err = -EINVAL ; - goto err_remove_mask; - } - err = -EEXIST ; goto err_remove_mask; }
Signature · 1 line
2.20.1
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 10 lines · On Fri, 19 Nov 2021 09:58:01 +0100 you wrote:
From: Yu Xiao <[email protected]>
Removing reduplicated error handling when running into error path of
nfp_compile_flow_metadata.Signed-off-by Yu Xiao <[email protected]>Signed-off-by Yinjun Zhang <[email protected]>Signed-off-by Simon Horman <[email protected]>[...]
Here is the summary with links:
- [net-next] nfp: flower: correction of error handling
https://git.kernel.org/netdev/net-next/c/eaa54d66145e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html