dsa: dsa: Fix freeing of fixed-phys from user ports.
authorAndrew Lunn <andrew@lunn.ch>
Fri, 11 Mar 2016 23:01:39 +0000 (00:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 19:43:11 +0000 (15:43 -0400)
All ports types can have a fixed PHY associated with it. Remove the
check which limits removal to only CPU and DSA ports.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c

index 1018e7d..f100f34 100644 (file)
@@ -443,9 +443,6 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
 
        /* Remove any fixed link PHYs */
        for (port = 0; port < DSA_MAX_PORTS; port++) {
-               if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
-                       continue;
-
                port_dn = cd->port_dn[port];
                if (of_phy_is_fixed_link(port_dn)) {
                        phydev = of_phy_find_device(port_dn);