summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-audio.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-08 11:45:34 -0200
committerDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-08 11:45:34 -0200
commit2f8e6c790e74ada20db6965056476d944041fdfa (patch)
tree34f1b097af1e0c7c9ab896b917037dd1bd936830 /linux/drivers/media/video/em28xx/em28xx-audio.c
parent3fd8c59cdeaedaa51a5db45b8dbf67dc6b907e19 (diff)
downloadmediapointer-dvb-s2-2f8e6c790e74ada20db6965056476d944041fdfa.tar.gz
mediapointer-dvb-s2-2f8e6c790e74ada20db6965056476d944041fdfa.tar.bz2
em28xx: remove bad check (changeset a31c595188af)
From: Douglas Schilling Landgraf <dougsland@redhat.com> Removed bad check. Thanks to Robert Krakora <rob.krakora@messagenetsystems.com> to report that. Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-audio.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-audio.c b/linux/drivers/media/video/em28xx/em28xx-audio.c
index fcf21a614..ebbc64b3a 100644
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c
@@ -62,7 +62,7 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
int i;
dprintk("Stopping isoc\n");
- for (i = 0; i < dev->isoc_ctl.num_bufs; i++) {
+ for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
if (!irqs_disabled())
usb_kill_urb(dev->adev.urb[i]);
else
@@ -74,7 +74,6 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
dev->adev.transfer_buffer[i] = NULL;
}
- dev->isoc_ctl.num_bufs = 0;
return 0;
}
@@ -179,8 +178,6 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
dprintk("Starting isoc transfers\n");
- dev->isoc_ctl.num_bufs = 0;
-
for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
struct urb *urb;
int j, k;
@@ -222,19 +219,10 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC);
if (errCode) {
- if (dev->isoc_ctl.num_bufs == 0) {
- usb_free_urb(dev->adev.urb[i]);
- dev->adev.urb[i] = NULL;
- kfree(dev->adev.transfer_buffer[i]);
- dev->adev.transfer_buffer[i] = NULL;
- } else
- em28xx_isoc_audio_deinit(dev);
+ em28xx_isoc_audio_deinit(dev);
return errCode;
}
- mutex_lock(&dev->lock);
- dev->isoc_ctl.num_bufs++;
- mutex_unlock(&dev->lock);
}
return 0;