]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: shmobile: rcar-gen2: Increase refcount for new reference
authorLiang He <windhl@126.com>
Fri, 1 Jul 2022 12:18:04 +0000 (20:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:04 +0000 (14:23 +0200)
commitcaa4fc9328397c6f6479bbb69a85a2ad80b22747
tree521fcc9fc1e4fec25ec3de17dfb4ea39aa7c793b
parent3fc25325c4a5fd9e305ddb468c19f0330a2feb46
ARM: shmobile: rcar-gen2: Increase refcount for new reference

[ Upstream commit 79a3e024597bad4f37c49a2465f072e89ce8984f ]

In rcar_gen2_regulator_quirk(), for_each_matching_node_and_match() will
automatically increase and decrease the refcount.  However, we should
call of_node_get() for the new reference created in 'quirk->np'.
Besides, we also should call of_node_put() before the 'quirk' being
freed.

Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220701121804.234223-1-windhl@126.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c