]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Add missing of_node_put()s in imc-pmu.c
authorLiang He <windhl@126.com>
Sat, 18 Jun 2022 07:13:53 +0000 (15:13 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 07:28:26 +0000 (17:28 +1000)
commit0a96e0b8a80fc76741e0302894977d3a08626b5f
tree742c3a664a24d84b0c5afbb639f0fbcc898a4b13
parentfbe220e6d10726c1cccfdc286d55e708baec1ef3
powerpc/perf: Add missing of_node_put()s in imc-pmu.c

In update_events_in_group(), of_find_node_by_phandle() will return
a node pointer with refcount incremented. The reference should be
dropped with of_node_put() in the failure path or when it is not used
anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20220618071353.4059000-1-windhl@126.com
arch/powerpc/perf/imc-pmu.c