mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2c60b6885a
commit
ee76db5e9e
1 changed files with 1 additions and 1 deletions
|
@ -289,9 +289,9 @@ static int gfar_of_init(struct net_device *dev)
|
|||
id = of_get_property(phy, "reg", NULL);
|
||||
|
||||
of_node_put(phy);
|
||||
of_node_put(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",
|
||||
bus_name, *id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue