diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-07-28 11:16:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-28 13:56:30 +0200 |
commit | d80f6d6665a6aa5875327f12491c90f428bf50b1 (patch) | |
tree | 4ce4111e0931b8291f5a1bc6388b4200d97dc0a2 /drivers/net/ethernet/netronome | |
parent | Merge branch 'devlink-register' (diff) | |
download | linux-d80f6d6665a6aa5875327f12491c90f428bf50b1.tar.xz linux-d80f6d6665a6aa5875327f12491c90f428bf50b1.zip |
nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
If nfp_tunnel_add_ipv6_off() fails, it should return error code
in nfp_fl_ct_add_offload().
Fixes: 5a2b93041646 ("nfp: flower-ct: compile match sections of flow_payload")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c index 1ac3b65df600..bfd7d1c35076 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c +++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c @@ -710,8 +710,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry) dst = &gre_match->ipv6.dst; entry = nfp_tunnel_add_ipv6_off(priv->app, dst); - if (!entry) + if (!entry) { + err = -ENOMEM; goto ct_offload_err; + } flow_pay->nfp_tun_ipv6 = entry; } else { @@ -760,8 +762,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry) dst = &udp_match->ipv6.dst; entry = nfp_tunnel_add_ipv6_off(priv->app, dst); - if (!entry) + if (!entry) { + err = -ENOMEM; goto ct_offload_err; + } flow_pay->nfp_tun_ipv6 = entry; } else { |