video: fbdev: atmel_lcdfb: fix display-timings lookup
authorJohan Hovold <johan@kernel.org>
Fri, 29 Dec 2017 18:48:43 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:01:16 +0000 (11:01 +0100)
commitaacf60b6ef76ebf6a5276d2e89cf7e0961a0636c
tree6c7c6d10a47c9073abfc142b272e052f801e6566
parentcd3b45b779244aa47442cdf901493c7830180eb1
video: fbdev: atmel_lcdfb: fix display-timings lookup

commit 9cb18db0701f6b74f0c45c23ad767b3ebebe37f6 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 display node was also prematurely
freed.

Note that the display and timings node references are never put after a
successful dt-initialisation so the nodes would leak on later probe
deferrals and on driver unbind.

Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
Cc: stable <stable@vger.kernel.org> # 3.13
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/atmel_lcdfb.c