Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354037
b: refs/heads/master
c: 215040e
h: refs/heads/master
i:
  354035: 5f74026
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 18, 2013
1 parent e135c1c commit 08235d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 6166ce878771edfe2d0fb9e719d5c4d4d4b82157
refs/heads/master: 215040e1238fa18caf5edf9bcd68126ecd8a6b2d
6 changes: 2 additions & 4 deletions trunk/drivers/staging/comedi/comedi_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,9 @@ unsigned int comedi_buf_read_free(struct comedi_async *async,
smp_mb();

allocated = comedi_buf_read_n_allocated(async);
if (nbytes > allocated) {
dev_info(async->subdevice->device->class_dev,
"attempted to read-free more bytes than have been read-allocated.\n");
if (nbytes > allocated)
nbytes = allocated;
}

async->buf_read_count += nbytes;
async->buf_read_ptr += nbytes;
async->buf_read_ptr %= async->prealloc_bufsz;
Expand Down

0 comments on commit 08235d0

Please sign in to comment.