diff options
author | Liang He <windhl@126.com> | 2022-07-20 15:10:03 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-07-22 04:04:19 +0200 |
commit | ebbbe23fdf6070e31509638df3321688358cc211 (patch) | |
tree | 04ec77f7b582bfdb68e3b14404dea64f230308d9 | |
parent | net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii (diff) | |
download | linux-ebbbe23fdf6070e31509638df3321688358cc211.tar.xz linux-ebbbe23fdf6070e31509638df3321688358cc211.zip |
net: sungem_phy: Add of_node_put() for reference returned by of_get_parent()
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>
-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 ff22b6b1c686..36803d932dff 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -450,6 +450,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); |