]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors
authorNicolai Stange <nstange@suse.de>
Mon, 15 Nov 2021 14:18:08 +0000 (15:18 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Nov 2021 05:16:50 +0000 (16:16 +1100)
commit03bd44727d6a7d194e43ac4ef7c98510ee76e27e
tree942f8b73df00402d05cf3de341ad475abac96141
parent9207d2c1ccdd9a3c71861956c9bc59d632075e89
crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors

Now that drbg_prepare_hrng() doesn't do anything but to instantiate a
jitterentropy crypto_rng instance, it looks a little odd to have the
related error handling at its only caller, drbg_instantiate().

Move the handling of jitterentropy allocation failures from
drbg_instantiate() close to the allocation itself in drbg_prepare_hrng().

There is no change in behaviour.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Reviewed-by: Stephan Müller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c