Skip to contentSkip to conversation

ocfs2: remove redundant initialization of variable ret

PATCH Applied Colin King 2 participants 2 messages Jun 13, 2021 – Jun 15, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ocfs2: 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, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 fs/ocfs2/cluster/nodemanager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/cluster/nodemanager.c +1 -1
index bb82e6b1ff4e..625c92521416 100644
@@ -824,7 +824,7 @@ static void __exit exit_o2nm(void)
 
 static int __init init_o2nm(void)
 {
-	int ret = -1;
+	int ret;
 
 	o2hb_init();
 
Signature · 1 line
2.31.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Colin King

From: Colin Ian King <[email protected]>

The variable ret is being initialized with a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Quoted 10 lines
---
 fs/ocfs2/cluster/nodemanager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/cluster/nodemanager.c +0 -0
index bb82e6b1ff4e..625c92521416 100644

fs/ocfs2/cluster/nodemanager.c static void __exit exit_o2nm(void) · line 830

Quoted 8 lines
fs/ocfs2/cluster/nodemanager.c +1 -1
@@ -824,7 +824,7 @@ static void __exit exit_o2nm(void)
 
 static int __init init_o2nm(void)
 {
-	int ret = -1;
+	int ret;
 
 	o2hb_init();
 

_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel