]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tracing: Remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Thu, 13 May 2021 11:55:17 +0000 (12:55 +0100)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 10 Jun 2021 15:16:20 +0000 (11:16 -0400)
The variable ret is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.

Link: https://lkml.kernel.org/r/20210513115517.58178-1-colin.king@canonical.com
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c

index 9299057feb56f75c7d08e942690c43dbfac94275..2e592885a167a832d672ea48301471d5370f0c8d 100644 (file)
@@ -6145,7 +6145,7 @@ static int __tracing_resize_ring_buffer(struct trace_array *tr,
 ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
                                  unsigned long size, int cpu_id)
 {
-       int ret = size;
+       int ret;
 
        mutex_lock(&trace_types_lock);