summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-08-25 16:25:08 +0300
committerJakub Kicinski <kuba@kernel.org>2022-08-27 05:48:19 +0300
commit53a406803ca5b0b1f91beffacad4321fae4fa2a7 (patch)
treec2862ffda0518d6f66ceb002b3e0cb7eaca886fb /net/sched
parent931d0a8b201a46aedb7767087438ea9e4467b6cd (diff)
downloadlinux-53a406803ca5b0b1f91beffacad4321fae4fa2a7.tar.xz
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>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index 48712bc51bda..29adac7812fe 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -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;