aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2018-08-27 10:21:51 +0200
committerRob Herring <robh@kernel.org>2018-10-23 13:28:52 -0500
commitac63043d8cb5503c7e0fe110f947eacf2663804e (patch)
tree282f1824abab7ed062274345df3900f467e9deb6 /drivers/nfc
parentnet: bcmgenet: fix OF child-node lookup (diff)
downloadlinux-dev-ac63043d8cb5503c7e0fe110f947eacf2663804e.tar.xz
linux-dev-ac63043d8cb5503c7e0fe110f947eacf2663804e.zip
net: stmmac: dwmac-sun8i: fix OF child-node lookup
Use the new of_get_compatible_child() helper to lookup the mdio-internal child node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (i.e. non-child) node. This also addresses a potential use-after-free (e.g. after probe deferral) as the tree-wide helper drops a reference to its first argument (i.e. the mdio-mux node). Fortunately, this was inadvertently balanced by a failure to drop the mdio-mux reference after lookup. While at it, also fix the related mdio-internal- and phy-node reference leaks. Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/nfc')
0 files changed, 0 insertions, 0 deletions