Commit 1ddc5d3e authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

net: dsa: remove redundant null pointer check before of_node_put

of_node_put has taken the null pointer check into account. So it is
safe to remove the duplicated check before of_node_put.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 764ea371
...@@ -465,7 +465,6 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds) ...@@ -465,7 +465,6 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
static void bcm_sf2_mdio_unregister(struct bcm_sf2_priv *priv) static void bcm_sf2_mdio_unregister(struct bcm_sf2_priv *priv)
{ {
mdiobus_unregister(priv->slave_mii_bus); mdiobus_unregister(priv->slave_mii_bus);
if (priv->master_mii_dn)
of_node_put(priv->master_mii_dn); of_node_put(priv->master_mii_dn);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment