linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] arm/ftrace: Remove the unneeded result variable
@ 2022-08-26  7:26 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-08-26  7:26 UTC (permalink / raw)
  To: linux
  Cc: rostedt, mingo, linux-arm-kernel, linux-kernel, ye xingchen, Zeal Robot

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

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-26  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26  7:26 [PATCH linux-next] arm/ftrace: Remove the unneeded result variable cgel.zte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).