xtensa: xtfpga: Fix refcount leak bug in setup
authorLiang He <windhl@126.com>
Fri, 17 Jun 2022 11:53:23 +0000 (19:53 +0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 18 Jun 2022 21:47:41 +0000 (14:47 -0700)
commit173940b3ae40114d4179c251a98ee039dc9cd5b3
treedae5ff169192eeea53d34a23218af4d22c90f399
parenta0117dc956429f2ede17b323046e1968d1849150
xtensa: xtfpga: Fix refcount leak bug in setup

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>
arch/xtensa/platforms/xtfpga/setup.c