summaryrefslogtreecommitdiff
path: root/drivers/media/pci/bt8xx/bttv-vbi.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2024-01-17 23:58:28 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-01-17 23:58:28 +0300
commitfe33c0fbed75dd464747c0faaedf94c7d8eb4101 (patch)
tree057a9d98ca492c55708baedcc59bf2ea3e2511c7 /drivers/media/pci/bt8xx/bttv-vbi.c
parent5d4747a6cc8e78ce74742d557fc9b7697fcacc95 (diff)
parent052d534373b7ed33712a63d5e17b2b6cdbce84fd (diff)
downloadlinux-fe33c0fbed75dd464747c0faaedf94c7d8eb4101.tar.xz
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'drivers/media/pci/bt8xx/bttv-vbi.c')
-rw-r--r--drivers/media/pci/bt8xx/bttv-vbi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-vbi.c b/drivers/media/pci/bt8xx/bttv-vbi.c
index ab213e51ec95..e489a3acb4b9 100644
--- a/drivers/media/pci/bt8xx/bttv-vbi.c
+++ b/drivers/media/pci/bt8xx/bttv-vbi.c
@@ -123,14 +123,12 @@ static void buf_cleanup_vbi(struct vb2_buffer *vb)
static int start_streaming_vbi(struct vb2_queue *q, unsigned int count)
{
- int ret;
int seqnr = 0;
struct bttv_buffer *buf;
struct bttv *btv = vb2_get_drv_priv(q);
btv->framedrop = 0;
- ret = check_alloc_btres_lock(btv, RESOURCE_VBI);
- if (ret == 0) {
+ if (!check_alloc_btres_lock(btv, RESOURCE_VBI)) {
if (btv->field_count)
seqnr++;
while (!list_empty(&btv->vcapture)) {
@@ -141,13 +139,13 @@ static int start_streaming_vbi(struct vb2_queue *q, unsigned int count)
vb2_buffer_done(&buf->vbuf.vb2_buf,
VB2_BUF_STATE_QUEUED);
}
- return !ret;
+ return -EBUSY;
}
if (!vb2_is_streaming(&btv->capq)) {
init_irqreg(btv);
btv->field_count = 0;
}
- return !ret;
+ return 0;
}
static void stop_streaming_vbi(struct vb2_queue *q)