Skip to content

Commit

Permalink
V4L/DVB (10517): em28xx: remove bad check (changeset a31c595188af)
Browse files Browse the repository at this point in the history
Removed bad check. Thanks to Robert Krakora <rob.krakora@messagenetsystems.com>
to report that.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Douglas Schilling Landgraf authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 56ee380 commit 3e099ba
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions drivers/media/video/em28xx/em28xx-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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
Expand All @@ -73,7 +73,6 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
dev->adev.transfer_buffer[i] = NULL;
}

dev->isoc_ctl.num_bufs = 0;
return 0;
}

Expand Down Expand Up @@ -157,8 +156,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;
Expand Down Expand Up @@ -200,19 +197,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;
Expand Down

0 comments on commit 3e099ba

Please sign in to comment.