]> git.baikalelectronics.ru Git - kernel.git/commit
Input: sparcspkr - fix refcount leak in bbc_beep_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 16 May 2022 21:55:55 +0000 (14:55 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 May 2022 04:10:11 +0000 (21:10 -0700)
commita444af349f911e95834cc3557ba956de9334b095
treeb7fb32da0a79238f9eb359e369b64e746867d9a2
parent230fdcf31f8075d4e1f8cafffa4da601ca7dcb06
Input: sparcspkr - fix refcount leak in bbc_beep_probe

of_find_node_by_path() calls of_find_node_opts_by_path(),
which returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: a9e20258a6fc ("input: Rewrite sparcspkr device probing.")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220516081018.42728-1-linmq006@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/sparcspkr.c