]> git.baikalelectronics.ru Git - kernel.git/commit
Input: sun4i-lradc-keys - add of_node_put() before return
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 12 Jul 2019 06:49:16 +0000 (23:49 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 12 Jul 2019 06:56:03 +0000 (23:56 -0700)
commit355a00d3ec5e595a7a7359fea2a2dccd0f62e64f
treec9d7f9e6dfd41876f5bf35cf00a627d5f4024411
parent1386eee7461901e4a564915c27390bf3ae0941b0
Input: sun4i-lradc-keys - add of_node_put() before return

Each iteration of for_each_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return in three places.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/sun4i-lradc-keys.c