summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/cpufeature.c
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2018-11-21 00:07:50 +0100
committerPalmer Dabbelt <palmer@sifive.com>2018-12-21 17:10:49 +0100
commit94f9bf118f1e294b3f2092f8bde02860f5e3ea3f (patch)
tree826070e27c2602f32ca179715c15a25312cda16b /arch/riscv/kernel/cpufeature.c
parentriscv, atomic: Add #define's for the atomic_{cmp,}xchg_*() variants (diff)
downloadlinux-94f9bf118f1e294b3f2092f8bde02860f5e3ea3f.tar.xz
linux-94f9bf118f1e294b3f2092f8bde02860f5e3ea3f.zip
RISC-V: Fix of_node_* refcount
Fix of_node* refcount at various places by using of_node_put. Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel/cpufeature.c')
-rw-r--r--arch/riscv/kernel/cpufeature.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 0339087aa652..a6e369edbbd7 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -56,8 +56,10 @@ void riscv_fill_hwcap(void)
if (of_property_read_string(node, "riscv,isa", &isa)) {
pr_warning("Unable to find \"riscv,isa\" devicetree entry");
+ of_node_put(node);
return;
}
+ of_node_put(node);
for (i = 0; i < strlen(isa); ++i)
elf_hwcap |= isa2hwcap[(unsigned char)(isa[i])];