summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 15:05:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 15:05:45 +0100
commit5593edfbfa30a049fca9abbd70a834d2888a4d9d (patch)
treea5c67524a82995fa17e44669c037fcced4fa91aa /net/dsa/dsa2.c
parent113ccc38378b6f0b24c0993040c6044e35163a51 (diff)
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
downloadtalos-op-linux-5593edfbfa30a049fca9abbd70a834d2888a4d9d.tar.gz
talos-op-linux-5593edfbfa30a049fca9abbd70a834d2888a4d9d.zip
Merge 4.10-rc4 into driver-core-next
We want the sysfs file revert and other fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 5fff951a0a49..da3862124545 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -394,9 +394,11 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst)
return err;
}
- err = dsa_cpu_port_ethtool_setup(dst->ds[0]);
- if (err)
- return err;
+ if (dst->ds[0]) {
+ err = dsa_cpu_port_ethtool_setup(dst->ds[0]);
+ if (err)
+ return err;
+ }
/* If we use a tagging format that doesn't have an ethertype
* field, make sure that all packets from this point on get
@@ -433,7 +435,8 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
dsa_ds_unapply(dst, ds);
}
- dsa_cpu_port_ethtool_restore(dst->ds[0]);
+ if (dst->ds[0])
+ dsa_cpu_port_ethtool_restore(dst->ds[0]);
pr_info("DSA: tree %d unapplied\n", dst->tree);
dst->applied = false;
OpenPOWER on IntegriCloud