mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-16 18:55:32 -05:00
ipv4: fib: Remove unnecessary encap_type check
lwtunnel_build_state() has check validity of encap_type, so no need to do this before call it. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250625022059.3958215-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
32155c6fd9
commit
77e12dba07
@@ -625,11 +625,6 @@ int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
|
||||
if (encap) {
|
||||
struct lwtunnel_state *lwtstate;
|
||||
|
||||
if (encap_type == LWTUNNEL_ENCAP_NONE) {
|
||||
NL_SET_ERR_MSG(extack, "LWT encap type not specified");
|
||||
err = -EINVAL;
|
||||
goto lwt_failure;
|
||||
}
|
||||
err = lwtunnel_build_state(net, encap_type, encap,
|
||||
nhc->nhc_family, cfg, &lwtstate,
|
||||
extack);
|
||||
|
||||
Reference in New Issue
Block a user