]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cifs: remove redundant initialization to variable mnt_sign_enabled
authorColin Ian King <colin.i.king@gmail.com>
Tue, 28 Jun 2022 21:32:29 +0000 (22:32 +0100)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Aug 2022 06:34:44 +0000 (01:34 -0500)
Variable mnt_sign_enabled is being initialized with a value that
is never read, it is being reassigned later on with a different
value. The initialization is redundant and can be removed.

Cleans up clang scan-build warning:
fs/cifs/cifssmb.c:465:7: warning: Value stored to 'mnt_sign_enabled
 during its initialization is never read

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifssmb.c

index 6371b9eebdad82009070fc120687bef373812053..9ed21752f2df8a986312b44eeede139fdfb03633 100644 (file)
@@ -462,7 +462,7 @@ cifs_enable_signing(struct TCP_Server_Info *server, bool mnt_sign_required)
 {
        bool srv_sign_required = server->sec_mode & server->vals->signing_required;
        bool srv_sign_enabled = server->sec_mode & server->vals->signing_enabled;
-       bool mnt_sign_enabled = global_secflags & CIFSSEC_MAY_SIGN;
+       bool mnt_sign_enabled;
 
        /*
         * Is signing required by mnt options? If not then check