Skip to contentSkip to conversation

module: main: remove unnecessary ‘0’ values from err

PATCH In review Li kunyu 2 participants 2 messages Dec 23, 2022 Module support

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 module: main: remove unnecessary ‘0’ values from err

err is assigned before use, so it does not need to initialize the assignment.

---
 kernel/module/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/module/main.c +1 -1
index ff2dfd1f548d..6e6e0428b183 100644
@@ -2669,7 +2669,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 		       int flags)
 {
 	struct module *mod;
-	long err = 0;
+	long err;
 	char *after_dashes;
 
 	/*
Signature · 1 line
2.18.2
maintainer
#1 lore raw
Quoted 2 lines · Li kunyu

err is assigned before use, so it does not need to initialize the assignment.

Sorry no, for something so simple, it just smells like you are wanting to incraese your commit count.

Luis