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]
Message-Id: <20220826072736.253086-1-ye.xingchen@zte.com.cn>
Date:   Fri, 26 Aug 2022 07:27:36 +0000
From:   cgel.zte@...il.com
To:     rostedt@...dmis.org
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] tracing: Remove the unneeded result variable

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

Return the value simple_read_from_buffer()  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>
---
 kernel/trace/trace_events.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 0356cae0cf74..9e4dd1720fff 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1435,7 +1435,6 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
 	struct trace_array *tr = dir->tr;
 	char buf[2];
 	int set = 0;
-	int ret;
 
 	mutex_lock(&event_mutex);
 	list_for_each_entry(file, &tr->events, list) {
@@ -1465,9 +1464,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
 	buf[0] = set_to_char[set];
 	buf[1] = '\n';
 
-	ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, 2);
-
-	return ret;
+	return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2);
 }
 
 static ssize_t
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ