backlight: max8925_bl: Fix Device Tree node lookup
authorJohan Hovold <johan@kernel.org>
Mon, 20 Nov 2017 10:45:45 +0000 (11:45 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Jun 2018 12:40:32 +0000 (13:40 +0100)
commitd1cc0ec3da23e44c23712579515494b374f111c9
treedea7ef35ebd0179b77600409c63eb332b4eaf128
parent4a9c8bb2aca5b5a2a15744333729745dd9903562
backlight: max8925_bl: Fix Device Tree node lookup

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,
while the child backlight node was leaked.

Cc: stable <stable@vger.kernel.org> # 3.9
Fixes: 47ec340cb8e2 ("mfd: max8925: Support dt for backlight")
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>
drivers/video/backlight/max8925_bl.c