[PATCH v2 9/9] power: supply: twl4030-charger: fix OF sibling-node lookup

2018-08-27 Thread Johan Hovold
Use the new of_get_compatible_child() helper to lookup the usb sibling node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (non-sibling) node. This also addresses a potential use-after-free (e.g. after probe

[PATCH v2 9/9] power: supply: twl4030-charger: fix OF sibling-node lookup

2018-08-27 Thread Johan Hovold
Use the new of_get_compatible_child() helper to lookup the usb sibling node instead of using of_find_compatible_node(), which searches the entire tree from a given start node and thus can return an unrelated (non-sibling) node. This also addresses a potential use-after-free (e.g. after probe