Message ID | 20211119085801.3879-1-simon.horman@corigine.com (mailing list archive) |
---|---|
State | Accepted |
Commit | eaa54d66145e4314eb785a507341a7c8b13f6df8 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] nfp: flower: correction of error handling | expand |
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Fri, 19 Nov 2021 09:58:01 +0100 you wrote: > From: Yu Xiao <yu.xiao@corigine.com> > > Removing reduplicated error handling when running into error path > of `nfp_compile_flow_metadata`. > > Signed-off-by: Yu Xiao <yu.xiao@corigine.com> > Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> > Signed-off-by: Simon Horman <simon.horman@corigine.com> > > [...] 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!
diff --git a/drivers/net/ethernet/netronome/nfp/flower/metadata.c b/drivers/net/ethernet/netronome/nfp/flower/metadata.c index 2af9faee96c5..0c60a436a8f2 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/metadata.c +++ b/drivers/net/ethernet/netronome/nfp/flower/metadata.c @@ -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; }