Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb1f3410 authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller
Browse files

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: 57ba4c9b ("fsl/fman: Add FMan MAC support")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 96683034
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -892,6 +892,8 @@ static int mac_probe(struct platform_device *_of_dev)
		priv->fixed_link->duplex = phy->duplex;
		priv->fixed_link->pause = phy->pause;
		priv->fixed_link->asym_pause = phy->asym_pause;

		put_device(&phy->mdio.dev);
	}

	err = mac_dev->init(mac_dev);