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

Message ID 20221223083232.4189-1-kunyu@nfschina.com
State New
Headers
Series module: main: remove unnecessary ‘0’ values from err |

Commit Message

Li kunyu Dec. 23, 2022, 8:32 a.m. UTC
  err is assigned before use, so it does not need to initialize the
assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 kernel/module/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Luis Chamberlain Dec. 23, 2022, 3:03 p.m. UTC | #1
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
  

Patch

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;
 
 	/*