Input: twl4030-vibra - fix sibling-node lookup
authorJohan Hovold <johan@kernel.org>
Tue, 9 Jan 2018 01:15:06 +0000 (17:15 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jan 2018 18:57:07 +0000 (19:57 +0100)
commitcb513d1414f910f3c30781cd5491ca57db2cae2f
treeeb0ae699b7c853e7ecf696d4e215254d0d432c43
parenteaabab6468b395e5d5fb66d7fd3363f96de3e61f
Input: twl4030-vibra - fix sibling-node lookup

commit 5b189201993ab03001a398de731045bfea90c689 upstream.

A helper purported to look up a child node based on its name was using
the wrong of-helper and ended up prematurely freeing the parent of-node
while searching the whole device tree depth-first starting at the parent
node.

Fixes: 64b9e4d803b1 ("input: twl4030-vibra: Support for DT booted kernel")
Fixes: e661d0a04462 ("Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/misc/twl4030-vibra.c