]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpuidle: riscv-sbi: Use scoped device node handling to fix missing of_node_put
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 20 Aug 2024 09:40:22 +0000 (11:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Aug 2024 19:46:43 +0000 (21:46 +0200)
commita309320ddbac6b1583224fcb6bacd424bcf8637f
tree8e32b2b8903a591453f95df3668676109bb8ba44
parent5bb33212b5c664396e5de4cd5a2999abb84a3978
cpuidle: riscv-sbi: Use scoped device node handling to fix missing of_node_put

Two return statements in sbi_cpuidle_dt_init_states() did not drop the
OF node reference count.  Solve the issue and simplify entire error
handling with scoped/cleanup.h.

Fixes: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20240820094023.61155-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-riscv-sbi.c