summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds2018-04-04 23:31:53 +0200
committerLinus Torvalds2018-04-04 23:31:53 +0200
commit0c21fd6e659342d6b6bb4b4c9ddc0f1c38b5216e (patch)
tree3f993ae0ff904c55b8ec8b0d44f2d4a4b4c3857e /include/linux
parentMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/t... (diff)
parentdrivers/char/random.c: remove unused dont_count_entropy (diff)
downloadkernel-qcow2-linux-0c21fd6e659342d6b6bb4b4c9ddc0f1c38b5216e.tar.gz
kernel-qcow2-linux-0c21fd6e659342d6b6bb4b4c9ddc0f1c38b5216e.tar.xz
kernel-qcow2-linux-0c21fd6e659342d6b6bb4b4c9ddc0f1c38b5216e.zip
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull /dev/random updates from Ted Ts'o: "A few random (cough, cough) cleanups for the /dev/random driver" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: drivers/char/random.c: remove unused dont_count_entropy random: optimize add_interrupt_randomness random: always fill buffer in get_random_bytes_wait random: use a tighter cap in credit_entropy_bits_safe()
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/random.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 4024f7d9c77d..2ddf13b4281e 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -85,10 +85,8 @@ static inline unsigned long get_random_canary(void)
static inline int get_random_bytes_wait(void *buf, int nbytes)
{
int ret = wait_for_random_bytes();
- if (unlikely(ret))
- return ret;
get_random_bytes(buf, nbytes);
- return 0;
+ return ret;
}
#define declare_get_random_var_wait(var) \