Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131413
b: refs/heads/master
c: ad28127
h: refs/heads/master
i:
  131411: bdc5ef6
v: v3
  • Loading branch information
Adam Baker authored and Mauro Carvalho Chehab committed Feb 17, 2009
1 parent 76f7996 commit fc69c78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28100165c3f27f681fee8b60e4e44f64a739c454
refs/heads/master: ad28127d7c7c617bca1d426f95b6ffa1fb8f700f
5 changes: 5 additions & 0 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ static void destroy_urbs(struct gspca_dev *gspca_dev)
if (urb == NULL)
break;

BUG_ON(!gspca_dev->dev);
gspca_dev->urb[i] = NULL;
if (!gspca_dev->present)
usb_kill_urb(urb);
Expand Down Expand Up @@ -1950,8 +1951,12 @@ void gspca_disconnect(struct usb_interface *intf)
{
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);

mutex_lock(&gspca_dev->usb_lock);
gspca_dev->present = 0;
mutex_unlock(&gspca_dev->usb_lock);

destroy_urbs(gspca_dev);
gspca_dev->dev = NULL;
usb_set_intfdata(intf, NULL);

/* release the device */
Expand Down

0 comments on commit fc69c78

Please sign in to comment.