aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 964d78d31578..a2329a11e139 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -899,7 +899,7 @@ static void init_std_data(struct entropy_store *r)
899 sizeof(*(utsname()))/4); 899 sizeof(*(utsname()))/4);
900} 900}
901 901
902static int __init rand_initialize(void) 902static int rand_initialize(void)
903{ 903{
904 init_std_data(&input_pool); 904 init_std_data(&input_pool);
905 init_std_data(&blocking_pool); 905 init_std_data(&blocking_pool);
@@ -1101,9 +1101,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
1101 /* Clear the entropy pool counters. */ 1101 /* Clear the entropy pool counters. */
1102 if (!capable(CAP_SYS_ADMIN)) 1102 if (!capable(CAP_SYS_ADMIN))
1103 return -EPERM; 1103 return -EPERM;
1104 init_std_data(&input_pool); 1104 rand_initialize();
1105 init_std_data(&blocking_pool);
1106 init_std_data(&nonblocking_pool);
1107 return 0; 1105 return 0;
1108 default: 1106 default:
1109 return -EINVAL; 1107 return -EINVAL;