]> git.baikalelectronics.ru Git - kernel.git/commit
net: ucc_geth: make probe consistently acquire a reference to the phy node
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 7 Aug 2014 21:48:25 +0000 (23:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Aug 2014 23:02:59 +0000 (16:02 -0700)
commitdb3bfa18aaf0426eb42ae9161f845217f28a877b
tree52c27a3d39fbc50b08f94d9c2c420042b89ba657
parenteb2c3f7e0d13c9c3d3a0264ad6b3eee6b68e6a3e
net: ucc_geth: make probe consistently acquire a reference to the phy node

When the driver attaches to a device that has a phy handle the probe
routine returns with a reference to that node. This reference is
correctly dropped in the error path and the remove function. In the
fixed phy case however no reference is acquired and so the error path
might drop a reference the driver isn't holding. Fix that by getting a
reference to the MAC.

Fixes: 9d9b4f5134e6 ("ucc_geth: use the new fixed PHY helpers")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/ucc_geth.c