Re: [PATCH v3] cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu
From: patchwork-bot+linux-riscv
Date: Thu Jan 09 2025 - 11:18:21 EST
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@xxxxxxxxxxxx>:
On Sat, 16 Nov 2024 00:32:39 +0100 you wrote:
> The 'np' device_node is initialized via of_cpu_device_node_get(), which
> requires explicit calls to of_node_put() when it is no longer required
> to avoid leaking the resource.
>
> Instead of adding the missing calls to of_node_put() in all execution
> paths, use the cleanup attribute for 'np' by means of the __free()
> macro, which automatically calls of_node_put() when the variable goes
> out of scope. Given that 'np' is only used within the
> for_each_possible_cpu(), reduce its scope to release the nood after
> every iteration of the loop.
>
> [...]
Here is the summary with links:
- [v3] cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu
https://git.kernel.org/riscv/c/7e25044b8045
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html