]> www.infradead.org Git - users/dwmw2/linux.git/commit
xtensa: xtfpga: Fix refcount leak bug in setup
authorLiang He <windhl@126.com>
Fri, 17 Jun 2022 11:53:23 +0000 (19:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 06:59:53 +0000 (08:59 +0200)
commit6c0839cf1b9e1b3c88da6af76794583cbfae8da3
treec06a4ffd867f44c9d4adeee20f3c8f45ed9f27cb
parent501652a2ad5450b4908e1f204ce75b2414c305b7
xtensa: xtfpga: Fix refcount leak bug in setup

commit 173940b3ae40114d4179c251a98ee039dc9cd5b3 upstream.

In machine_setup(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put() when
it is not used anymore.

Cc: stable@vger.kernel.org
Signed-off-by: Liang He <windhl@126.com>
Message-Id: <20220617115323.4046905-1-windhl@126.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/platforms/xtfpga/setup.c