diff options
-rw-r--r-- | include/linux/random.h | 4 |
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) | |||
85 | static inline int get_random_bytes_wait(void *buf, int nbytes) | 85 | static inline int get_random_bytes_wait(void *buf, int nbytes) |
86 | { | 86 | { |
87 | int ret = wait_for_random_bytes(); | 87 | int ret = wait_for_random_bytes(); |
88 | if (unlikely(ret)) | ||
89 | return ret; | ||
90 | get_random_bytes(buf, nbytes); | 88 | get_random_bytes(buf, nbytes); |
91 | return 0; | 89 | return ret; |
92 | } | 90 | } |
93 | 91 | ||
94 | #define declare_get_random_var_wait(var) \ | 92 | #define declare_get_random_var_wait(var) \ |