diff options
author | Liang He <windhl@126.com> | 2022-07-20 21:10:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-03 12:03:48 +0200 |
commit | 777d18e65d0901d5cb05c0497e359192279f0498 (patch) | |
tree | bf7c5d96cb8d72daccb5f89519267fb62d36eda6 /drivers/net | |
parent | 40f4739bbd36796e7029a824dfa4509d08d2f776 (diff) | |
download | linux-stable-777d18e65d0901d5cb05c0497e359192279f0498.tar.gz linux-stable-777d18e65d0901d5cb05c0497e359192279f0498.tar.bz2 linux-stable-777d18e65d0901d5cb05c0497e359192279f0498.zip |
net: sungem_phy: Add of_node_put() for reference returned by of_get_parent()
[ Upstream commit ebbbe23fdf6070e31509638df3321688358cc211 ]
In bcm5421_init(), we should call of_node_put() for the reference
returned by of_get_parent() which has increased the refcount.
Fixes: 3c326fe9cb7a ("[PATCH] ppc64: Add new PHY to sungem")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220720131003.1287426-1-windhl@126.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sungem_phy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 291fa449993f..45f295403cb5 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -454,6 +454,7 @@ static int bcm5421_init(struct mii_phy* phy) int can_low_power = 1; if (np == NULL || of_get_property(np, "no-autolowpower", NULL)) can_low_power = 0; + of_node_put(np); if (can_low_power) { /* Enable automatic low-power */ sungem_phy_write(phy, 0x1c, 0x9002); |