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: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Ywd4NIoS4aiilnMv@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Dan Carpenter 2022-08-25 16:25:08 +03:00 committed by Jakub Kicinski
parent 931d0a8b20
commit 53a406803c

View File

@ -488,7 +488,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
}
if (opt == NULL)
return handle ? -EINVAL : 0;
return -EINVAL;
err = nla_parse_nested_deprecated(tb, TCA_ROUTE4_MAX, opt,
route4_policy, NULL);
@ -496,7 +496,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
return err;
fold = *arg;
if (fold && handle && fold->handle != handle)
if (fold && fold->handle != handle)
return -EINVAL;
err = -ENOBUFS;