Skip to content

Commit cb1f341

Browse files
jhovolddavem330
authored andcommitted
net: fsl/fman: fix fixed-link-phydev reference leak
Make sure to drop the reference taken by of_phy_find_device() when looking up a fixed-link phydev during probe. Fixes: 57ba4c9 ("fsl/fman: Add FMan MAC support") Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9668303 commit cb1f341

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/freescale/fman

1 file changed

+2
-0
lines changed

drivers/net/ethernet/freescale/fman/mac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,8 @@ static int mac_probe(struct platform_device *_of_dev)
892892
priv->fixed_link->duplex = phy->duplex;
893893
priv->fixed_link->pause = phy->pause;
894894
priv->fixed_link->asym_pause = phy->asym_pause;
895+
896+
put_device(&phy->mdio.dev);
895897
}
896898

897899
err = mac_dev->init(mac_dev);

0 commit comments

Comments
 (0)