Commit b702f1c7 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[hw_random] fix bug, bump version

Fix ugly bug in read(2) path for odd buffer sizes.
Noticed by Joseph Chan @ Via.

Bump version to 1.0.0.
parent 7de87b0e
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/* /*
* core module and version information * core module and version information
*/ */
#define RNG_VERSION "0.9.0" #define RNG_VERSION "1.0.0"
#define RNG_MODULE_NAME "hw_random" #define RNG_MODULE_NAME "hw_random"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION #define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": " #define PFX RNG_MODULE_NAME ": "
...@@ -499,7 +499,7 @@ static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size, ...@@ -499,7 +499,7 @@ static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
spin_unlock (&rng_lock); spin_unlock (&rng_lock);
while (have_data > 0) { while (have_data && size) {
if (put_user((u8)data, buf++)) { if (put_user((u8)data, buf++)) {
ret = ret ? : -EFAULT; ret = ret ? : -EFAULT;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment