Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Jakub Kicinski
53a40680 931d0a8b

+2 -2
+2 -2
net/sched/cls_route.c
··· 488 488 } 489 489 490 490 if (opt == NULL) 491 - return handle ? -EINVAL : 0; 491 + return -EINVAL; 492 492 493 493 err = nla_parse_nested_deprecated(tb, TCA_ROUTE4_MAX, opt, 494 494 route4_policy, NULL); ··· 496 496 return err; 497 497 498 498 fold = *arg; 499 - if (fold && handle && fold->handle != handle) 499 + if (fold && fold->handle != handle) 500 500 return -EINVAL; 501 501 502 502 err = -ENOBUFS;