X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Fs390%2Fcrypto%2Fprng.c;h=eca724d229ecd26d7102dfd7c7d4be37af98d19f;hb=e3c6d4ee545e427b55882d97d3b663c6411645fe;hp=0cfefddd83755366fee0dae7634ccca6342b21dd;hpb=bd45ac0c5daae35e7c71138172e63df5cf644cf6;p=mv-sheeva.git diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index 0cfefddd837..eca724d229e 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ static unsigned char parm_block[32] = { static int prng_open(struct inode *inode, struct file *file) { + cycle_kernel_lock(); return nonseekable_open(inode, file); } @@ -185,11 +187,8 @@ static int __init prng_init(void) prng_seed(16); ret = misc_register(&prng_dev); - if (ret) { - printk(KERN_WARNING - "Could not register misc device for PRNG.\n"); + if (ret) goto out_buf; - } return 0; out_buf: