net: dsa: lantiq_gswip: fix OF child-node lookups
authorJohan Hovold <johan@kernel.org>
Wed, 16 Jan 2019 10:23:34 +0000 (11:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2019 20:12:19 +0000 (12:12 -0800)
commitc8cbcb0d8bd72d44fad1a5ddc348ac10e0fb1b37
tree87d63fd641b6de5ed60e5a51c4032afe9684f86e
parentaed13f2e00ce278f039b76e7ac84d419aff48ef6
net: dsa: lantiq_gswip: fix OF child-node lookups

Use the new of_get_compatible_child() helper to look up child nodes to
avoid ever matching non-child nodes elsewhere in the tree.

Also fix up the related struct device_node leaks.

Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
Cc: stable <stable@vger.kernel.org> # 4.20
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lantiq_gswip.c