]> 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)
commit0fbd3eefb1c9734aa27d46823178968670bb028a
tree0a8b36c9cbe0efda369c08d2dbf8100602663eab
parent1dfea950d6d8ae021b69dd1ecfdf8657a65d45a1
Input: twl6040-vibra - fix DT node memory management

commit e5df857355d3 ("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