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)
commit6bed0118012ea350acbe606ab3ae0ed3d60ed5f3
tree6ee4dfe1760a53e6ba3a43e60d1954891b1fa478
parentc7262aaace1b17a650598063e3b9ee1785fde377
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: 5d69e0076a72 ("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