backlight: as3711_bl: Fix Device Tree node lookup
authorJohan Hovold <johan@kernel.org>
Mon, 20 Nov 2017 10:45:44 +0000 (11:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:24:59 +0000 (11:24 +0200)
commit3db7c40093f6dc58fdfaf2723980955dedadf0a3
treefe47a2a2d66b1dbfebee9c03d243e260a4ebe563
parentb7261fc5f5748b3f6f1a839dbc5a744b8871dfcd
backlight: as3711_bl: Fix Device Tree node lookup

commit 4a9c8bb2aca5b5a2a15744333729745dd9903562 upstream.

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

To make things worse, the parent mfd node was also prematurely freed.

Cc: stable <stable@vger.kernel.org> # 3.10
Fixes: 59eb2b5e57ea ("drivers/video/backlight/as3711_bl.c: add OF support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/backlight/as3711_bl.c