cifs: fix uninitialized variable in smb3_fs_context_parse_param
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 14 Dec 2020 06:40:27 +0000 (16:40 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 14 Dec 2020 19:40:43 +0000 (13:40 -0600)
Addresses an issue noted by the kernel test robot

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/fs_context.c

index a309e49..ca745fa 100644 (file)
@@ -726,8 +726,10 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
         * we will need special handling of them.
         */
        if (param->type == fs_value_is_string && param->string[0] == 0) {
-               if (!strcmp("pass", param->key) || !strcmp("password", param->key))
+               if (!strcmp("pass", param->key) || !strcmp("password", param->key)) {
                        skip_parsing = true;
+                       opt = Opt_pass;
+               }
        }
 
        if (!skip_parsing) {