Skip to content

Commit

Permalink
[media] em28xx-audio: Properly report failures to start stream
Browse files Browse the repository at this point in the history
If the audio stream fails for any reason, it should:
	1) Report an error via dmesg;
	2) Mark internally that the stream didn't started.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 66cb695 commit debb724
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/em28xx/em28xx-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ 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) {
em28xx_errdev("submit of audio urb failed\n");
em28xx_deinit_isoc_audio(dev);
atomic_set(&dev->stream_started, 0);
return errCode;
}

}

return 0;
Expand Down

0 comments on commit debb724

Please sign in to comment.