]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: fix of_node and phydev leaks
authorJohan Hovold <johan@kernel.org>
Thu, 24 Nov 2016 18:21:31 +0000 (19:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 01:01:15 +0000 (20:01 -0500)
commitf5e84f29b94a6fd5436a0a22b5465261832b32b8
tree0c8c0a6f7970c96c4827a06f9c0d0e19b9e62e48
parentd90a9613cb6e5d4a7e77550759eec6747ac11b53
net: qcom/emac: fix of_node and phydev leaks

Make sure to drop the reference taken by of_phy_find_device() during
probe on probe errors and on driver unbind.

Also drop the of_node reference taken by of_parse_phandle() in the same
path.

Fixes: 537813f6160a ("net: emac: emac gigabit ethernet controller driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-phy.c
drivers/net/ethernet/qualcomm/emac/emac.c