Skip to content

Commit

Permalink
Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister befor…
Browse files Browse the repository at this point in the history
…e mdiobus_free"

This reverts commit aa73187.

As pointed out by Ben Hutchings, this change is not correct.

mdiobus_unregister() can't be called if the bus isn't registered yet,
however this change can result in situations which cause that to
happen.

Part of the confusion here revolves around the fact that the
callers of this module control registration/unregistration,
rather than the module itself.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Nov 15, 2012
1 parent 769ce4c commit 80d1178
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/phy/mdio-bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ void free_mdio_bitbang(struct mii_bus *bus)
struct mdiobb_ctrl *ctrl = bus->priv;

module_put(ctrl->ops->owner);
mdiobus_unregister(bus);
mdiobus_free(bus);
}
EXPORT_SYMBOL(free_mdio_bitbang);
Expand Down

0 comments on commit 80d1178

Please sign in to comment.