Skip to content

Commit

Permalink
gianfar: Fix use-after-of_node_put() in gfar_of_init().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Mar 29, 2009
1 parent 2c60b68 commit ee76db5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ee76db5

Please sign in to comment.