]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: jitterentropy - drop redundant delta check in jent_entropy_init
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 4 May 2026 08:28:50 +0000 (10:28 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 May 2026 10:08:36 +0000 (18:08 +0800)
Since start_time = end_time - delta, start_time can only equal end_time
when delta is 0, making the explicit end_time == start_time check
redundant. Remove it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/jitterentropy.c

index d5832caa8ab3cd0c3592204c9ebfdfd6f9a21f20..6ac0257e8e0a4dc17b85fcd21444c591428c34e8 100644 (file)
@@ -775,7 +775,7 @@ int jent_entropy_init(unsigned int osr, unsigned int flags,
                 * delta even when called shortly after each other -- this
                 * implies that we also have a high resolution timer
                 */
-               if (!delta || (end_time == start_time)) {
+               if (!delta) {
                        ret = JENT_ECOARSETIME;
                        goto out;
                }