summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
index b6469aa2c..1db637351 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
@@ -123,7 +123,7 @@ ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, in
if (copy_to_user(buf, rbuf->data+rbuf->pread, todo))
return -EFAULT;
- rbuf->pread = (rbuf->pread + len) % rbuf->size;
+ rbuf->pread = (rbuf->pread + todo) % rbuf->size;
return len;
}
@@ -155,7 +155,7 @@ ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
if (copy_from_user(rbuf->data+rbuf->pwrite, buf, todo))
return -EFAULT;
- rbuf->pwrite = (rbuf->pwrite + len) % rbuf->size;
+ rbuf->pwrite = (rbuf->pwrite + todo) % rbuf->size;
return len;
}