Skip to content

Commit ebbbe23

Browse files
windhlkuba-moo
authored andcommitted
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: 3c326fe ("[PATCH] ppc64: Add new PHY to sungem") Signed-off-by: Liang He <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 27161db commit ebbbe23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/sungem_phy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ static int bcm5421_init(struct mii_phy* phy)
450450
int can_low_power = 1;
451451
if (np == NULL || of_get_property(np, "no-autolowpower", NULL))
452452
can_low_power = 0;
453+
of_node_put(np);
453454
if (can_low_power) {
454455
/* Enable automatic low-power */
455456
sungem_phy_write(phy, 0x1c, 0x9002);

0 commit comments

Comments
 (0)