]>
Commit | Line | Data |
---|---|---|
a65d4bac GKH |
1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
2 | From: Florian Fainelli <f.fainelli@gmail.com> | |
3 | Date: Thu, 10 May 2018 13:17:30 -0700 | |
4 | Subject: net: phy: phylink: Release link GPIO | |
5 | ||
6 | From: Florian Fainelli <f.fainelli@gmail.com> | |
7 | ||
8 | [ Upstream commit daab3349ad1a69663ccad278ed71d55974d104b4 ] | |
9 | ||
10 | We are not releasing the link GPIO descriptor with gpiod_put() which results in | |
11 | subsequent probing to get -EBUSY when calling fwnode_get_named_gpiod(). Fix this | |
12 | by doing the release in phylink_destroy(). | |
13 | ||
14 | Fixes: 9525ae83959b ("phylink: add phylink infrastructure") | |
15 | Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> | |
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
17 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | --- | |
20 | drivers/net/phy/phylink.c | 2 ++ | |
21 | 1 file changed, 2 insertions(+) | |
22 | ||
23 | --- a/drivers/net/phy/phylink.c | |
24 | +++ b/drivers/net/phy/phylink.c | |
25 | @@ -561,6 +561,8 @@ void phylink_destroy(struct phylink *pl) | |
26 | { | |
27 | if (pl->sfp_bus) | |
28 | sfp_unregister_upstream(pl->sfp_bus); | |
29 | + if (!IS_ERR(pl->link_gpio)) | |
30 | + gpiod_put(pl->link_gpio); | |
31 | ||
32 | cancel_work_sync(&pl->resolve); | |
33 | kfree(pl); |