led: qcom-lpg: Fix resource leaks in for_each_available_child_of_node() loops

[ Upstream commit 8f38f8fa72 ]

Ensure child node references are decremented properly in the error path.

Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Link: https://lore.kernel.org/r/20230525111705.3055-1-luhongfei@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Lu Hongfei 2023-05-25 19:17:03 +08:00 • committed by Greg Kroah-Hartman
commit 09b490f3bb