]> git.karo-electronics.de Git - karo-tx-linux.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)
commit6ffe1c4cd0a77f51d8d2985aa721d636b03ddf58
tree0c8c0a6f7970c96c4827a06f9c0d0e19b9e62e48
parentcb1f3410ff12520b22fa03ccd23892c360de0c26
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: b9b17debc69d ("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