Skip to content

Commit

Permalink
net_sched: remove impossible conditions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Aug 27, 2022
1 parent 931d0a8 commit 53a4068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/cls_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,15 @@ 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);
if (err < 0)
return err;

fold = *arg;
if (fold && handle && fold->handle != handle)
if (fold && fold->handle != handle)
return -EINVAL;

err = -ENOBUFS;
Expand Down

0 comments on commit 53a4068

Please sign in to comment.