Commit ee76db5e authored by David S. Miller's avatar David S. Miller

gianfar: Fix use-after-of_node_put() in gfar_of_init().

We can't put 'mdio' until after we've used it in the
fsl_pq_mdio_bus_name() call.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c60b688
...@@ -289,9 +289,9 @@ static int gfar_of_init(struct net_device *dev) ...@@ -289,9 +289,9 @@ static int gfar_of_init(struct net_device *dev)
id = of_get_property(phy, "reg", NULL); id = of_get_property(phy, "reg", NULL);
of_node_put(phy); of_node_put(phy);
of_node_put(mdio);
fsl_pq_mdio_bus_name(bus_name, mdio); fsl_pq_mdio_bus_name(bus_name, mdio);
of_node_put(mdio);
snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x", snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x",
bus_name, *id); bus_name, *id);
} }
......
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