]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: davinci_emac: fix device reference leak
authorJohan Hovold <johan@kernel.org>
Thu, 3 Nov 2016 17:40:21 +0000 (18:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2016 18:17:30 +0000 (13:17 -0500)
commitcea16e51a85e1bcd0ca270d5b333e506b5564c17
tree6ee4dfe1760a53e6ba3a43e60d1954891b1fa478
parent64d2ee9fac4ee14b4e4375805161705570ace3ab
net: ethernet: ti: davinci_emac: fix device reference leak

Make sure to drop the references taken by bus_find_device() before
returning from emac_dev_open().

Note that phy_connect still takes a reference to the phy device.

Fixes: df9b350b3c94 ("net: davinci_emac: switch to new mdio")
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_emac.c