regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 11 May 2022 11:35:05 +0000 (15:35 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:56 +0000 (10:22 +0200)
commit56ab0c01027492cd161c64148e1dc892c56887ad
tree995e64ebe704c1ff00b2e5d2bf23b8afa8466efd
parent24491124406666bf0dcb9ee10c5575c6ce6a1730
regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt

[ Upstream commit afaa7b933ef00a2d3262f4d1252087613fb5c06d ]

of_node_get() returns a node with refcount incremented.
Calling of_node_put() to drop the reference when not needed anymore.

Fixes: 3784b6d64dc5 ("regulator: pfuze100: add pfuze100 regulator driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511113506.45185-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/pfuze100-regulator.c