summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-12-17 04:11:55 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-17 04:11:55 +0100
commitc30abd5e40dd863f88e26be09b6ce949145a630a (patch)
tree5b25362084308502a336d8da26b8dc7430d7c812 /net/sched/cls_api.c
parentnet: phy: broadcom: Add entry for 5395 switch PHYs (diff)
parentMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma (diff)
downloadlinux-c30abd5e40dd863f88e26be09b6ce949145a630a.tar.xz
linux-c30abd5e40dd863f88e26be09b6ce949145a630a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three sets of overlapping changes, two in the packet scheduler and one in the meson-gxl PHY driver. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 5b9b8a61e8c4..32b1ea7cf863 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -23,7 +23,6 @@
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/kmod.h>
-#include <linux/err.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/sock.h>
@@ -345,6 +344,8 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q,
/* Hold a refcnt for all chains, so that they don't disappear
* while we are iterating.
*/
+ if (!block)
+ return;
list_for_each_entry(chain, &block->chain_list, list)
tcf_chain_hold(chain);
@@ -367,8 +368,6 @@ void tcf_block_put(struct tcf_block *block)
{
struct tcf_block_ext_info ei = {0, };
- if (!block)
- return;
tcf_block_put_ext(block, block->q, &ei);
}