]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: skcipher - remove redundant check for SKCIPHER_WALK_SLOW
authorEric Biggers <ebiggers@google.com>
Sun, 5 Jan 2025 19:34:12 +0000 (11:34 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Jan 2025 03:38:32 +0000 (11:38 +0800)
In skcipher_walk_done(), remove the check for SKCIPHER_WALK_SLOW because
it is always true.  All other flags (and lack thereof) were checked
earlier in the function, leaving SKCIPHER_WALK_SLOW as the only
remaining possibility.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c

index c627e267b125321f549d63b599152db60e4ebb7d..98606def1bf9a726a0ca18fc3742eab9c157d4f8 100644 (file)
@@ -120,7 +120,7 @@ unmap_src:
                skcipher_map_dst(walk);
                memcpy(walk->dst.virt.addr, walk->page, n);
                skcipher_unmap_dst(walk);
-       } else if (unlikely(walk->flags & SKCIPHER_WALK_SLOW)) {
+       } else { /* SKCIPHER_WALK_SLOW */
                if (res > 0) {
                        /*
                         * Didn't process all bytes.  Either the algorithm is