aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-11 14:43:39 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-11 14:43:39 -0500
commit02ac5d1487115d160fab4c3e61b7edc20a945af9 (patch)
tree08a39341379ce6f1ad4f3997df36c76ee82cee9c /net/dsa/dsa2.c
parent265592a1dfc31ecab02a960721a1f137e50afb17 (diff)
parentba836a6f5ab1243ff5e08a941a2d1de8b31244e1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 9526bdf2a34a..42a41d84053c 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -378,9 +378,11 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst)
378 return err; 378 return err;
379 } 379 }
380 380
381 err = dsa_cpu_port_ethtool_setup(dst->ds[0]); 381 if (dst->ds[0]) {
382 if (err) 382 err = dsa_cpu_port_ethtool_setup(dst->ds[0]);
383 return err; 383 if (err)
384 return err;
385 }
384 386
385 /* If we use a tagging format that doesn't have an ethertype 387 /* If we use a tagging format that doesn't have an ethertype
386 * field, make sure that all packets from this point on get 388 * field, make sure that all packets from this point on get
@@ -417,7 +419,8 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
417 dsa_ds_unapply(dst, ds); 419 dsa_ds_unapply(dst, ds);
418 } 420 }
419 421
420 dsa_cpu_port_ethtool_restore(dst->ds[0]); 422 if (dst->ds[0])
423 dsa_cpu_port_ethtool_restore(dst->ds[0]);
421 424
422 pr_info("DSA: tree %d unapplied\n", dst->tree); 425 pr_info("DSA: tree %d unapplied\n", dst->tree);
423 dst->applied = false; 426 dst->applied = false;