Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298860
b: refs/heads/master
c: 16418bb
h: refs/heads/master
v: v3
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent a990400 commit 0ef2bca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2e110d7596656e2badd21c48713bd01e1b40f44
refs/heads/master: 16418bb1da8a685e639c6c4f2d3096f762e8b0fb
12 changes: 6 additions & 6 deletions trunk/drivers/char/tile-srom.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,17 @@ static ssize_t srom_read(struct file *filp, char __user *buf,

hv_retval = _srom_read(srom->hv_devhdl, kernbuf,
*f_pos, bytes_this_pass);
if (hv_retval > 0) {
if (copy_to_user(buf, kernbuf, hv_retval) != 0) {
retval = -EFAULT;
break;
}
} else if (hv_retval <= 0) {
if (hv_retval <= 0) {
if (retval == 0)
retval = hv_retval;
break;
}

if (copy_to_user(buf, kernbuf, hv_retval) != 0) {
retval = -EFAULT;
break;
}

retval += hv_retval;
*f_pos += hv_retval;
buf += hv_retval;
Expand Down

0 comments on commit 0ef2bca

Please sign in to comment.