diff options
author | Johan Hovold <johan@kernel.org> | 2018-08-27 10:21:53 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-10-23 13:28:53 -0500 |
commit | 9844fb2e351311210e6660a9a1c62d17424a6145 (patch) | |
tree | 802a7f3c566481a4e46a32b4adecbec2a7b1805f /arch/arm/mm/fault.c | |
parent | 5bf59773aaf36dd62117dc83d50e1bbf9ef432da (diff) | |
download | linux-9844fb2e351311210e6660a9a1c62d17424a6145.tar.bz2 |
power: supply: twl4030-charger: fix OF sibling-node lookup
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
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).
While at it, also fix the related phy-node reference leak.
Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.")
Cc: stable <stable@vger.kernel.org> # 4.2
Cc: NeilBrown <neilb@suse.de>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/arm/mm/fault.c')
0 files changed, 0 insertions, 0 deletions