Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14859
b: refs/heads/master
c: 50ab5ed
h: refs/heads/master
i:
  14857: b0626e2
  14855: febf2f7
v: v3
  • Loading branch information
Nickolay V. Shmyrev authored and Linus Torvalds committed Dec 1, 2005
1 parent a208744 commit aa83a61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 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: 3b86b9999deb04bbfbb20e6b6fe1119a4bf0ff34
refs/heads/master: 50ab5edc973c979e8f620e09d20b96761d271894
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,8 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
field = videobuf_next_field(&fh->cap);
if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) {
kfree (fh->cap.read_buf);
fh->cap.read_buf = NULL;
up(&fh->cap.lock);
return POLLERR;
}
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/media/video/video-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,9 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data,
int retval;

/* setup stuff */
retval = -ENOMEM;
q->read_buf = videobuf_alloc(q->msize);
if (NULL == q->read_buf)
goto done;
return -ENOMEM;

q->read_buf->memory = V4L2_MEMORY_USERPTR;
q->read_buf->baddr = (unsigned long)data;
Expand Down Expand Up @@ -819,8 +818,11 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
q->read_buf->memory = V4L2_MEMORY_USERPTR;
field = videobuf_next_field(q);
retval = q->ops->buf_prepare(q,q->read_buf,field);
if (0 != retval)
if (0 != retval) {
kfree (q->read_buf);
q->read_buf = NULL;
goto done;
}
spin_lock_irqsave(q->irqlock,flags);
q->ops->buf_queue(q,q->read_buf);
spin_unlock_irqrestore(q->irqlock,flags);
Expand Down

0 comments on commit aa83a61

Please sign in to comment.