Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115596
b: refs/heads/master
c: f051ae1
h: refs/heads/master
v: v3
  • Loading branch information
David Ellingsworth authored and Mauro Carvalho Chehab committed Oct 17, 2008
1 parent ec856ad commit bc15294
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 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: 081d868faeb7acdd655c28607f84e797240bd035
refs/heads/master: f051ae1866e67567b4f33371969dee9cdddb34ed
18 changes: 7 additions & 11 deletions trunk/drivers/media/video/stk-webcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static void stk_clean_iso(struct stk_camera *dev)

urb = dev->isobufs[i].urb;
if (urb) {
if (atomic_read(&dev->urbs_used))
if (atomic_read(&dev->urbs_used) && is_present(dev))
usb_kill_urb(urb);
usb_free_urb(urb);
}
Expand Down Expand Up @@ -688,18 +688,14 @@ static int v4l_stk_release(struct inode *inode, struct file *fp)
{
struct stk_camera *dev = fp->private_data;

if (dev->owner != fp) {
usb_autopm_put_interface(dev->interface);
return 0;
if (dev->owner == fp) {
stk_stop_stream(dev);
stk_free_buffers(dev);
dev->owner = NULL;
}

stk_stop_stream(dev);

stk_free_buffers(dev);

dev->owner = NULL;

usb_autopm_put_interface(dev->interface);
if(is_present(dev))
usb_autopm_put_interface(dev->interface);

return 0;
}
Expand Down

0 comments on commit bc15294

Please sign in to comment.