Merge 5.9.0-rc6 into tty-next
[linux-2.6-microblaze.git] / drivers / net / dsa / mt7530.c
index 0c37ddb..1aaf47a 100644 (file)
@@ -1326,14 +1326,17 @@ mt7530_setup(struct dsa_switch *ds)
 
                        if (phy_node->parent == priv->dev->of_node->parent) {
                                ret = of_get_phy_mode(mac_np, &interface);
-                               if (ret && ret != -ENODEV)
+                               if (ret && ret != -ENODEV) {
+                                       of_node_put(mac_np);
                                        return ret;
+                               }
                                id = of_mdio_parse_addr(ds->dev, phy_node);
                                if (id == 0)
                                        priv->p5_intf_sel = P5_INTF_SEL_PHY_P0;
                                if (id == 4)
                                        priv->p5_intf_sel = P5_INTF_SEL_PHY_P4;
                        }
+                       of_node_put(mac_np);
                        of_node_put(phy_node);
                        break;
                }
@@ -1501,7 +1504,7 @@ unsupported:
                phylink_set(mask, 100baseT_Full);
 
                if (state->interface != PHY_INTERFACE_MODE_MII) {
-                       phylink_set(mask, 1000baseT_Half);
+                       /* This switch only supports 1G full-duplex. */
                        phylink_set(mask, 1000baseT_Full);
                        if (port == 5)
                                phylink_set(mask, 1000baseX_Full);