net: dsa: realtek-smi: fix OF child-node lookup

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: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
Cc: stable <>     # 4.19: 36156f9241cb0
Cc: Linus Walleij <>
Signed-off-by: Johan Hovold <>
Reviewed-by: Andrew Lunn <>
Signed-off-by: David S. Miller <>
1 file changed