]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: remove conditional return with no effect
authorSang-Heon Jeon <ekffu200098@gmail.com>
Thu, 23 Jul 2026 18:45:36 +0000 (03:45 +0900)
committerSteve French <stfrench@microsoft.com>
Sun, 26 Jul 2026 22:40:20 +0000 (17:40 -0500)
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb1maperror.c

index ab3d09613c91912ae150b1cc5bcc6a5c95f793cc..395299f9121bdfd3e9b62c837671251bacbd1c5d 100644 (file)
@@ -234,11 +234,7 @@ int __init smb1_init_maperror(void)
        if (rc)
                return rc;
 
-       rc = mapping_table_ERRSRV_is_sorted();
-       if (rc)
-               return rc;
-
-       return rc;
+       return mapping_table_ERRSRV_is_sorted();
 }
 
 #if IS_ENABLED(CONFIG_SMB1_KUNIT_TESTS)