OSDN Git Service

ASoC: twl4030: fix child-node lookup
authorJohan Hovold <johan@kernel.org>
Mon, 13 Nov 2017 11:12:56 +0000 (12:12 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 16 Nov 2017 12:02:15 +0000 (12:02 +0000)
commit15f8c5f2415bfac73f33a14bcd83422bcbfb5298
tree05bd07a4ba5dfefc7001b00b0d7974ce565a3022
parentdf6a3e245541ac61cc99f2887437e0a43dd08f2e
ASoC: twl4030: fix child-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 codec node was also prematurely freed,
while the child node was leaked.

Fixes: 2d6d649a2e0f ("ASoC: twl4030: Support for DT booted kernel")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable <stable@vger.kernel.org>
sound/soc/codecs/twl4030.c