]> git.ipfire.org Git - thirdparty/linux.git/commit
random: drop check for static_key_initialized
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 11 Nov 2025 00:13:06 +0000 (01:13 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 11 Nov 2025 00:25:31 +0000 (01:25 +0100)
commit2db833312d7e6ae22111a6fd3e733b2a14986a29
treebc363bc683aa66bec30799d73824d0b1800ab052
parent933ecf591275e850a46b28c6016d2688b92e23f6
random: drop check for static_key_initialized

Commit e871abcda3b6 ("random: handle creditable entropy from atomic
process context") added the use of workqueues, which meant testing
whether the workqueue is valid, but it did not remove the existing check
of whether static keys have been initialized. This static key check is
unnecessary because workqueues are initialized long after it. And
semantically it doesn't make much sense either, because it's not really
directly calling a static key function in the condition.

Remove the now unnecessary check.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
[Jason: rewrite commit message with different explanation, rebase on
        random.git, and update code comment.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c