From: tiny.windzz@gmail.com (Yangtao Li)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: add missing of_node_put()
Date: Tue, 20 Nov 2018 09:01:09 -0500 [thread overview]
Message-ID: <20181120140109.20334-1-tiny.windzz@gmail.com> (raw)
use of_node_put() to release the refcount.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
arch/arm/kernel/devtree.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index e3057c1b55b9..9576adf0d15b 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -101,7 +101,7 @@ void __init arm_dt_init_cpu_maps(void)
if (!cell || prop_bytes < sizeof(*cell)) {
pr_debug(" * %pOF missing reg property\n", cpu);
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -115,7 +115,7 @@ void __init arm_dt_init_cpu_maps(void)
if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) {
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -129,7 +129,7 @@ void __init arm_dt_init_cpu_maps(void)
if (WARN(tmp_map[j] == hwid,
"Duplicate /cpu reg properties in the DT\n")) {
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -171,7 +171,7 @@ void __init arm_dt_init_cpu_maps(void)
if (!bootcpu_valid) {
pr_warn("DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map\n");
- return;
+ goto out;
}
/*
@@ -184,6 +184,8 @@ void __init arm_dt_init_cpu_maps(void)
cpu_logical_map(i) = tmp_map[i];
pr_debug("cpu logical map 0x%x\n", cpu_logical_map(i));
}
+out:
+ of_node_put(cpus);
}
bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
--
2.17.0
WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: linux@armlinux.org.uk, akpm@linux-foundation.org,
rppt@linux.vnet.ibm.com, robh@kernel.org, mhocko@suse.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH] arm: add missing of_node_put()
Date: Tue, 20 Nov 2018 09:01:09 -0500 [thread overview]
Message-ID: <20181120140109.20334-1-tiny.windzz@gmail.com> (raw)
use of_node_put() to release the refcount.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
arch/arm/kernel/devtree.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index e3057c1b55b9..9576adf0d15b 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -101,7 +101,7 @@ void __init arm_dt_init_cpu_maps(void)
if (!cell || prop_bytes < sizeof(*cell)) {
pr_debug(" * %pOF missing reg property\n", cpu);
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -115,7 +115,7 @@ void __init arm_dt_init_cpu_maps(void)
if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) {
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -129,7 +129,7 @@ void __init arm_dt_init_cpu_maps(void)
if (WARN(tmp_map[j] == hwid,
"Duplicate /cpu reg properties in the DT\n")) {
of_node_put(cpu);
- return;
+ goto out;
}
/*
@@ -171,7 +171,7 @@ void __init arm_dt_init_cpu_maps(void)
if (!bootcpu_valid) {
pr_warn("DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map\n");
- return;
+ goto out;
}
/*
@@ -184,6 +184,8 @@ void __init arm_dt_init_cpu_maps(void)
cpu_logical_map(i) = tmp_map[i];
pr_debug("cpu logical map 0x%x\n", cpu_logical_map(i));
}
+out:
+ of_node_put(cpus);
}
bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
--
2.17.0
next reply other threads:[~2018-11-20 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 14:01 Yangtao Li [this message]
2018-11-20 14:01 ` [PATCH] arm: add missing of_node_put() Yangtao Li
-- strict thread matches above, loose matches on Subject: below --
2019-04-13 7:14 [PATCH 0/4] ARM: imx legacy: cleanups Nicholas Mc Guire
2019-04-13 7:14 ` [PATCH] ARM: add missing of_node_put() Nicholas Mc Guire
2019-04-13 7:14 ` Nicholas Mc Guire
2018-11-20 13:56 [PATCH] arm: " Yangtao Li
2018-11-20 13:56 ` Yangtao Li
2018-06-15 12:28 [PATCH] ARM: " Nicholas Mc Guire
2018-06-15 12:28 ` Nicholas Mc Guire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181120140109.20334-1-tiny.windzz@gmail.com \
--to=tiny.windzz@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.