Commit d80f6d66 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

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: 5a2b9304 ("nfp: flower-ct: compile match sections of flow_payload")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarLouis Peens <louis.peens@corigine.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3bdc7066
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment