diff options
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 5e36b9a4ae3e..2ed24527ecd6 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -423,7 +423,8 @@ static void destroy_urbs(struct gspca_dev *gspca_dev) | |||
423 | break; | 423 | break; |
424 | 424 | ||
425 | gspca_dev->urb[i] = NULL; | 425 | gspca_dev->urb[i] = NULL; |
426 | usb_kill_urb(urb); | 426 | if (!gspca_dev->present) |
427 | usb_kill_urb(urb); | ||
427 | if (urb->transfer_buffer != NULL) | 428 | if (urb->transfer_buffer != NULL) |
428 | usb_buffer_free(gspca_dev->dev, | 429 | usb_buffer_free(gspca_dev->dev, |
429 | urb->transfer_buffer_length, | 430 | urb->transfer_buffer_length, |
@@ -1950,7 +1951,6 @@ void gspca_disconnect(struct usb_interface *intf) | |||
1950 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); | 1951 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); |
1951 | 1952 | ||
1952 | gspca_dev->present = 0; | 1953 | gspca_dev->present = 0; |
1953 | gspca_dev->streaming = 0; | ||
1954 | 1954 | ||
1955 | usb_set_intfdata(intf, NULL); | 1955 | usb_set_intfdata(intf, NULL); |
1956 | 1956 | ||