aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c9
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index fcc300c93995..5d882a44e3ee 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -62,12 +62,15 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
62 62
63 dprintk("Stopping isoc\n"); 63 dprintk("Stopping isoc\n");
64 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { 64 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
65 usb_kill_urb(dev->adev.urb[i]); 65 if (!irqs_disabled())
66 usb_kill_urb(dev->adev.urb[i]);
67 else
68 usb_unlink_urb(dev->adev.urb[i]);
66 usb_free_urb(dev->adev.urb[i]); 69 usb_free_urb(dev->adev.urb[i]);
67 dev->adev.urb[i] = NULL; 70 dev->adev.urb[i] = NULL;
68 71
69 kfree(dev->adev.transfer_buffer[i]); 72 kfree(dev->adev.transfer_buffer[i]);
70 dev->adev.transfer_buffer[i] = NULL; 73 dev->adev.transfer_buffer[i] = NULL;
71 } 74 }
72 75
73 return 0; 76 return 0;
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 71ad35192c06..94fb1b639a2e 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -860,8 +860,11 @@ void em28xx_uninit_isoc(struct em28xx *dev)
860 for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { 860 for (i = 0; i < dev->isoc_ctl.num_bufs; i++) {
861 urb = dev->isoc_ctl.urb[i]; 861 urb = dev->isoc_ctl.urb[i];
862 if (urb) { 862 if (urb) {
863 usb_kill_urb(urb); 863 if (!irqs_disabled())
864 usb_unlink_urb(urb); 864 usb_kill_urb(urb);
865 else
866 usb_unlink_urb(urb);
867
865 if (dev->isoc_ctl.transfer_buffer[i]) { 868 if (dev->isoc_ctl.transfer_buffer[i]) {
866 usb_buffer_free(dev->udev, 869 usb_buffer_free(dev->udev,
867 urb->transfer_buffer_length, 870 urb->transfer_buffer_length,