lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 26 Aug 2022 07:26:03 +0000
From:   cgel.zte@...il.com
To:     linux@...linux.org.uk
Cc:     rostedt@...dmis.org, mingo@...hat.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] arm/ftrace: Remove the unneeded result variable

From: ye xingchen <ye.xingchen@....com.cn>

Return the value ftrace_modify_code() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 arch/arm/kernel/ftrace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index a0b6d1e3812f..94924a2ecd94 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -190,7 +190,6 @@ int ftrace_make_nop(struct module *mod,
 	unsigned long ip = rec->ip;
 	unsigned long old;
 	unsigned long new;
-	int ret;
 
 #ifdef CONFIG_ARM_MODULE_PLTS
 	/* mod is only supplied during module loading */
@@ -216,9 +215,8 @@ int ftrace_make_nop(struct module *mod,
 	 * so validation may fail spuriously in such cases. Let's work around
 	 * this by omitting those from validation.
 	 */
-	ret = ftrace_modify_code(ip, old, new, !is_kernel_inittext(ip));
 
-	return ret;
+	return ftrace_modify_code(ip, old, new, !is_kernel_inittext(ip));
 }
 #endif /* CONFIG_DYNAMIC_FTRACE */
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ