diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 3bcb2551b..aeaef1045 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -3168,9 +3168,10 @@ int ci_ll_reset(ring_buffer_t *cibuf, struct file *file, { int i; - if (ring_buffer_free(cibuf)<8) + if (ring_buffer_free(cibuf)<=8) return -EBUSY; - for (i=0; i<2; i++) + + for (i=0; i<2; i++) { if (slots&(1<<i)) { cibuf->data[cibuf->pwrite]=0x00; cibuf->data[(cibuf->pwrite+1)%cibuf->size]=0x06; @@ -3183,7 +3184,9 @@ int ci_ll_reset(ring_buffer_t *cibuf, struct file *file, cibuf->pwrite=(cibuf->pwrite+8)%cibuf->size; slot[i].flags=0; } - return 0; + } + + return 0; } static ssize_t |