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: 57ba4c9b56 ("fsl/fman: Add FMan MAC support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Johan Hovold 2016-11-24 19:21:30 +01:00 committed by David S. Miller
parent 9668303403
commit cb1f3410ff

View File

@ -892,6 +892,8 @@ static int mac_probe(struct platform_device *_of_dev)
priv->fixed_link->duplex = phy->duplex; priv->fixed_link->duplex = phy->duplex;
priv->fixed_link->pause = phy->pause; priv->fixed_link->pause = phy->pause;
priv->fixed_link->asym_pause = phy->asym_pause; priv->fixed_link->asym_pause = phy->asym_pause;
put_device(&phy->mdio.dev);
} }
err = mac_dev->init(mac_dev); err = mac_dev->init(mac_dev);