diff mbox series

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

Message ID 20231020082727.10659-1-zhoujie@nfschina.com (mailing list archive)
State New, archived
Headers show
Series module: main: Remove unnecessary ‘0’ values from err | expand

Commit Message

ZhouJie Oct. 20, 2023, 8:27 a.m. UTC
Remove redundant assignment .The variable 'err' was assigned a value
before its usage, making the initial assignment unnecessary. This commit
removes the redundant assignment, improving code clarity and efficiency.

Signed-off-by: ZhouJie <zhoujie@nfschina.com>
---
 kernel/module/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/module/main.c b/kernel/module/main.c
index 98fedfdb8db52..a3c036eb7bcdb 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2830,7 +2830,7 @@  static int load_module(struct load_info *info, const char __user *uargs,
 {
 	struct module *mod;
 	bool module_allocated = false;
-	long err = 0;
+	long err;
 	char *after_dashes;
 
 	/*