Skip to contentSkip to conversation

tracing: remove redundant initialization of variable ret

PATCH New Colin King 1 participant 1 message May 13, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 tracing: remove redundant initialization of variable ret

From: Colin Ian King <[email protected]>

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.

Addresses-Coverity: ("Unused value")

---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.c +1 -1
index 560e4c8d3825..f2ceec787b2d 100644
@@ -6122,7 +6122,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);
 
Signature · 1 line
2.30.2