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

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@kili


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 931d0a8b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;