]> git.baikalelectronics.ru Git - kernel.git/commit
Input: twl6040-vibra - fix DT node memory management
authorH. Nikolaus Schaller <hns@goldelico.com>
Tue, 10 May 2016 00:01:01 +0000 (17:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 10 May 2016 00:07:04 +0000 (17:07 -0700)
commit3801d01cbcf6f2fa7444ebb9f2f504992787acc5
tree0a8b36c9cbe0efda369c08d2dbf8100602663eab
parent2437ad457a62c6ee845a1f85cafca8039c33cebc
Input: twl6040-vibra - fix DT node memory management

commit 2696f4f37363 ("Input: twl6040-vibra - update for device tree support")

made the separate vibra DT node to a subnode of the twl6040.

It now calls of_find_node_by_name() to locate the "vibra" subnode.
This function has a side effect to call of_node_put on() for the twl6040
parent node passed in as a parameter. This causes trouble later on.

Solution: we must call of_node_get() before of_find_node_by_name()

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/twl6040-vibra.c