Commit 53a40680 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

net_sched: remove impossible conditions

We no longer allow "handle" to be zero, so there is no need to check
for that.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Ywd4NIoS4aiilnMv@kiliSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 931d0a8b
...@@ -488,7 +488,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, ...@@ -488,7 +488,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
} }
if (opt == NULL) if (opt == NULL)
return handle ? -EINVAL : 0; return -EINVAL;
err = nla_parse_nested_deprecated(tb, TCA_ROUTE4_MAX, opt, err = nla_parse_nested_deprecated(tb, TCA_ROUTE4_MAX, opt,
route4_policy, NULL); route4_policy, NULL);
...@@ -496,7 +496,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, ...@@ -496,7 +496,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
return err; return err;
fold = *arg; fold = *arg;
if (fold && handle && fold->handle != handle) if (fold && fold->handle != handle)
return -EINVAL; return -EINVAL;
err = -ENOBUFS; err = -ENOBUFS;
......
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