Commit 96683034 authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller

net: fsl/fman: fix phydev reference leak

Make sure to drop the reference taken by of_phy_find_device() during
initialisation when later freeing the struct fman_mac.

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 0da60541
...@@ -1107,6 +1107,9 @@ int memac_free(struct fman_mac *memac) ...@@ -1107,6 +1107,9 @@ int memac_free(struct fman_mac *memac)
{ {
free_init_resources(memac); free_init_resources(memac);
if (memac->pcsphy)
put_device(&memac->pcsphy->mdio.dev);
kfree(memac->memac_drv_param); kfree(memac->memac_drv_param);
kfree(memac); kfree(memac);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment