diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:50:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:50:03 +0000 |
commit | 01a69402cf9d38ff180345d55c2ee51c7e89fbc7 (patch) | |
tree | b406c5242a088c4f59c6e4b719b783f43aca6ae9 /drivers/net/dsa/bcm_sf2.c | |
parent | Adding upstream version 6.7.12. (diff) | |
download | linux-d6208063787d081e93f32d9942baa7f9358b45f1.tar.xz linux-d6208063787d081e93f32d9942baa7f9358b45f1.zip |
Adding upstream version 6.8.9.upstream/6.8.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index cadee5505c..4a52ccbe39 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -621,8 +621,6 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds) goto err_of_node_put; } - priv->master_mii_dn = dn; - priv->user_mii_bus = mdiobus_alloc(); if (!priv->user_mii_bus) { err = -ENOMEM; @@ -635,7 +633,6 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds) priv->user_mii_bus->write = bcm_sf2_sw_mdio_write; snprintf(priv->user_mii_bus->id, MII_BUS_ID_SIZE, "sf2-%d", index++); - priv->user_mii_bus->dev.of_node = dn; /* Include the pseudo-PHY address to divert reads towards our * workaround. This is only required for 7445D0, since 7445E0 @@ -683,9 +680,11 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds) } err = mdiobus_register(priv->user_mii_bus); - if (err && dn) + if (err) goto err_free_user_mii_bus; + of_node_put(dn); + return 0; err_free_user_mii_bus: |