diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-05-10 13:17:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-03 07:47:52 +0200 |
commit | a35b70b64fa0fd6c9ba3b66d4555e807c1f51d90 (patch) | |
tree | 924d54fdb23a4bd52fbba1507cb3814e2438d154 /drivers/net | |
parent | 3ad25429ea42464d7ab22df46920177034578991 (diff) | |
download | linux-stable-a35b70b64fa0fd6c9ba3b66d4555e807c1f51d90.tar.gz linux-stable-a35b70b64fa0fd6c9ba3b66d4555e807c1f51d90.tar.bz2 linux-stable-a35b70b64fa0fd6c9ba3b66d4555e807c1f51d90.zip |
net: phy: phylink: Release link GPIO
[ Upstream commit daab3349ad1a69663ccad278ed71d55974d104b4 ]
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: 9525ae83959b ("phylink: add phylink infrastructure")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/phylink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index c582b2d7546c..18ee7546e4a8 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -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); |