]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:56 +0000 (16:29 +0200)
commit62004f17039dc60cb500337b0792c9f6bbda8e27
tree1599af357a3509e8a78ce87a6d1083edbeacd6ab
parent662ec52260cc07b9ae53ecd3925183c29d34288b
cpuidle: riscv-sbi: Use scoped device node handling to fix missing of_node_put

commit a309320ddbac6b1583224fcb6bacd424bcf8637f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpuidle/cpuidle-riscv-sbi.c