Skip to content

Commit dcaf12a

Browse files
jhovolddtor
authored andcommitted
Input: twl6040-vibra - fix child-node lookup
Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. Later sanity checks on node properties (which would likely be missing) should prevent this from causing much trouble however, especially as the original premature free of the parent node has already been fixed separately (but that "fix" was apparently never backported to stable). Fixes: e7ec014 ("Input: twl6040-vibra - update for device tree support") Fixes: c52c545 ("Input: twl6040-vibra - fix DT node memory management") Cc: stable <[email protected]> # 3.6 Signed-off-by: Johan Hovold <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Tested-by: H. Nikolaus Schaller <[email protected]> (on Pyra OMAP5 hardware) Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 5b18920 commit dcaf12a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/input/misc/twl6040-vibra.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
248248
int vddvibr_uV = 0;
249249
int error;
250250

251-
of_node_get(twl6040_core_dev->of_node);
252-
twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
251+
twl6040_core_node = of_get_child_by_name(twl6040_core_dev->of_node,
253252
"vibra");
254253
if (!twl6040_core_node) {
255254
dev_err(&pdev->dev, "parent of node is missing?\n");

0 commit comments

Comments
 (0)