summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-11-01 12:43:20 -0400
committerTakashi Iwai <tiwai@suse.de>2017-11-01 12:43:20 -0400
commita53a0ab8ff725672fcb47bb9a5ef75fce45679d0 (patch)
tree75cdea78f27fdd569d72cea0b7837bbcc8d871f7 /net/dsa/dsa2.c
parent1f20f9ff57ca23b9f5502fca85ce3977e8496cb1 (diff)
parentb817d936248b9bcee8282e97fb1dda1b03c903fe (diff)
Merge tag 'asoc-fix-v4.14-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.14 A bunch of fixes here, mostly device specific ones (the biggest one being the revert of the hotword support for rt5514), with a couple of core fixes for potential issues with corrupted or otherwise invalid topology files.
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 873af0108e24..045d8a176279 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -496,14 +496,15 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
496 if (!ethernet) 496 if (!ethernet)
497 return -EINVAL; 497 return -EINVAL;
498 ethernet_dev = of_find_net_device_by_node(ethernet); 498 ethernet_dev = of_find_net_device_by_node(ethernet);
499 if (!ethernet_dev)
500 return -EPROBE_DEFER;
499 } else { 501 } else {
500 ethernet_dev = dsa_dev_to_net_device(ds->cd->netdev[index]); 502 ethernet_dev = dsa_dev_to_net_device(ds->cd->netdev[index]);
503 if (!ethernet_dev)
504 return -EPROBE_DEFER;
501 dev_put(ethernet_dev); 505 dev_put(ethernet_dev);
502 } 506 }
503 507
504 if (!ethernet_dev)
505 return -EPROBE_DEFER;
506
507 if (!dst->cpu_dp) { 508 if (!dst->cpu_dp) {
508 dst->cpu_dp = port; 509 dst->cpu_dp = port;
509 dst->cpu_dp->netdev = ethernet_dev; 510 dst->cpu_dp->netdev = ethernet_dev;