regulator: s5m8767: Fix reference count leak

Call of_node_put() to drop references of regulators_np and reg_np before
returning error code.

Fixes: 9ae5cc75ce ("regulator: s5m8767: Pass descriptor instead of GPIO number")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20210121032756.49501-1-bianpan2016@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Pan Bian 2021-01-20 19:27:56 -08:00 • committed by Mark Brown
commit dea6dd2ba6
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0