err is assigned before use, so it does not need to initialize the
assignment.
Signed-off-by: Li kunyu <[email protected]>
---
kernel/module/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index ff2dfd1f548d..6e6e0428b183 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -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;
/*
--
2.18.2
On Fri, Dec 23, 2022 at 04:32:32PM +0800, Li kunyu wrote:
> 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