Skip to content

Commit

Permalink
net: sched: fix typo in walker_check_empty()
Browse files Browse the repository at this point in the history
Function walker_check_empty() incorrectly verifies that tp pointer is not
NULL, instead of actual filter pointer. Fix conditional to check the right
pointer. Adjust filter pointer naming accordingly to other cls API
functions.

Fixes: 6676d5e ("net: sched: set dedicated tcf_walker flag when tp is empty")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Buslov authored and David S. Miller committed Feb 26, 2019
1 parent 24ed490 commit 268a351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ static void tcf_proto_put(struct tcf_proto *tp, bool rtnl_held,
tcf_proto_destroy(tp, rtnl_held, extack);
}

static int walker_check_empty(struct tcf_proto *tp, void *d,
static int walker_check_empty(struct tcf_proto *tp, void *fh,
struct tcf_walker *arg)
{
if (tp) {
if (fh) {
arg->nonempty = true;
return -1;
}
Expand Down

0 comments on commit 268a351

Please sign in to comment.