Input: 88pm860x-ts - fix child-node lookup
authorJohan Hovold <johan@kernel.org>
Tue, 9 Jan 2018 01:20:18 +0000 (17:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jan 2018 18:58:16 +0000 (19:58 +0100)
commit1bb19ef3ea52ddc5a24a84e456eac96b5b01dc08
tree7c5222702e627b03e8d9fd41889f85f332dea610
parentb276eae8834746a00a62c56890ec93d1f54950ac
Input: 88pm860x-ts - fix child-node lookup

commit 906bf7daa0618d0ef39f4872ca42218c29a3631f upstream.

Fix child node-lookup during probe, which ended up searching the whole
device tree depth-first starting at parent rather than just matching on
its children.

To make things worse, the parent node was prematurely freed, while the
child node was leaked.

Fixes: 2e57d56747e6 ("mfd: 88pm860x: Device tree support")
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/touchscreen/88pm860x-ts.c