Skip to contentSkip to conversation

orangefs: remove redundant assignment to variable ret

PATCH In review Colin King 2 participants 2 messages May 24, 2020 – Jun 1, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 orangefs: remove redundant assignment to variable ret

From: Colin Ian King <[email protected]>

The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 fs/orangefs/orangefs-mod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/orangefs/orangefs-mod.c +1 -1
index c010c1fddafc..289b648ae196 100644
@@ -79,7 +79,7 @@ DECLARE_WAIT_QUEUE_HEAD(orangefs_request_list_waitq);
 
 static int __init orangefs_init(void)
 {
-	int ret = -1;
+	int ret;
 	__u32 i = 0;
 
 	if (op_timeout_secs < 0)
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Hi Colin... thanks for the patch, I have applied it to the orangefs for-next tree...

-Mike

Quoted 29 lines · Colin King

From: Colin Ian King <[email protected]>

The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 fs/orangefs/orangefs-mod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/orangefs/orangefs-mod.c +1 -2
index c010c1fddafc..289b648ae196 100644
@@ -79,7 +79,7 @@ DECLARE_WAIT_QUEUE_HEAD(orangefs_request_list_waitq);
 
 static int __init orangefs_init(void)
 {
-       int ret = -1;
+       int ret;
        __u32 i = 0;
 
        if (op_timeout_secs < 0)
--

2.25.1