[PATCH] perf/profile: Remove unused local variable err

From: yang_yongxin123

Date: Sun Aug 23 2026 - 22:45:33 EST


From: Yongxin Yang <yangyongxin@xxxxxxxxxx>

Variable err is declared but never used in this function.
Remove it to avoid compiler warning.

No functional change.

Signed-off-by: Yongxin Yang <yangyongxin@xxxxxxxxxx>
---
kernel/profile.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/profile.c b/kernel/profile.c
index 1fcf1adcf4eb..6f63e3a8d3fb 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -216,7 +216,6 @@ static const struct proc_ops profile_proc_ops = {
int __ref create_proc_profile(void)
{
struct proc_dir_entry *entry;
- int err = 0;

if (!prof_on)
return 0;
@@ -224,7 +223,7 @@ int __ref create_proc_profile(void)
NULL, &profile_proc_ops);
if (entry)
proc_set_size(entry, (1 + prof_len) * sizeof(atomic_t));
- return err;
+ return 0;
}
subsys_initcall(create_proc_profile);
#endif /* CONFIG_PROC_FS */
--
2.25.1