OSDN Git Service

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:21:32 +0000 (11:21 +0200)
commit91a9aaeb5e97c358689cee66168c6adfac4e697d
tree2a18398403fe2afe9bc46ddcee91858d5b16b7ad
parent10f64c9dfb1cf1f3a1fa4dfca3f0aa4858dec6d4
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