[for-next][PATCH 06/11] tracing: Remove redundant initialization of variable ret

From: Steven Rostedt
Date: Wed Jun 09 2021 - 21:02:12 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9299057feb56..2e592885a167 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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);

--
2.30.2