Skip to content

Commit

Permalink
net: phy: phylink: Release link GPIO
Browse files Browse the repository at this point in the history
We are not releasing the link GPIO descriptor with gpiod_put() which results in
subsequent probing to get -EBUSY when calling fwnode_get_named_gpiod(). Fix this
by doing the release in phylink_destroy().

Fixes: 9525ae8 ("phylink: add phylink infrastructure")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed May 11, 2018
1 parent bb322a9 commit daab334
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ void phylink_destroy(struct phylink *pl)
{
if (pl->sfp_bus)
sfp_unregister_upstream(pl->sfp_bus);
if (!IS_ERR(pl->link_gpio))
gpiod_put(pl->link_gpio);

cancel_work_sync(&pl->resolve);
kfree(pl);
Expand Down

0 comments on commit daab334

Please sign in to comment.