Input: 88pm860x-ts - fix child-node lookup
authorJohan Hovold <johan@kernel.org>
Tue, 9 Jan 2018 01:20:18 +0000 (17:20 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 9 Jan 2018 01:40:59 +0000 (17:40 -0800)
commit906bf7daa0618d0ef39f4872ca42218c29a3631f
tree1b8188fbdef4fca4cf3e64ad1980ab9b3af4137e
parentdcaf12a8b0bbdbfcfa2be8dff2c4948d9844b4ad
Input: 88pm860x-ts - fix child-node lookup

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")
Cc: stable <stable@vger.kernel.org> # 3.7
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/88pm860x-ts.c