git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[S390] hw_random: allow rng_dev_read() to return hardware errors.
[safe/jmp/linux-2.6]
/
drivers
/
char
/
hw_random
/
core.c
diff --git
a/drivers/char/hw_random/core.c
b/drivers/char/hw_random/core.c
index
84cdf90
..
349b6ed
100644
(file)
--- a/
drivers/char/hw_random/core.c
+++ b/
drivers/char/hw_random/core.c
@@
-116,6
+116,10
@@
static ssize_t rng_dev_read(struct file *filp, char __user *buf,
err = -EAGAIN;
if (!bytes_read && (filp->f_flags & O_NONBLOCK))
goto out;
+ if (bytes_read < 0) {
+ err = bytes_read;
+ goto out;
+ }
err = -EFAULT;
while (bytes_read && size) {