diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-03-18 16:45:04 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-03-18 17:05:37 +0000 |
commit | 196f0bb081db462bc0f9a9462f47c9639101204b (patch) | |
tree | 05e772f3202b4c0f326491c90af0cb5dbf7eb147 /src/crypto/entropy.c | |
parent | 66f200bdacc80cacc46c59ed0f49b3ddf0e357f1 (diff) | |
download | ipxe-196f0bb081db462bc0f9a9462f47c9639101204b.tar.gz |
[rng] Allow entropy_enable() to return an error
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto/entropy.c')
-rw-r--r-- | src/crypto/entropy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/entropy.c b/src/crypto/entropy.c index cb3d54d8f..03e7290a3 100644 --- a/src/crypto/entropy.c +++ b/src/crypto/entropy.c @@ -422,7 +422,8 @@ int get_entropy_input_tmp ( unsigned int num_samples, uint8_t *tmp, int rc; /* Enable entropy gathering */ - entropy_enable(); + if ( ( rc = entropy_enable() ) != 0 ) + return rc; /* Perform mandatory startup tests, if not yet performed */ for ( ; startup_tested < startup_test_count() ; startup_tested++ ) { |