Commit bf6e8aaa authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] em28xx-audio: provide an error code when URB submit fails

Instead of just saying:
	[ 1646.412419] em2882/3 #0: submit of audio urb failed
Print the reason why it failed, to help debugging and fixing it.
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 0191a2a2
...@@ -163,10 +163,9 @@ static void em28xx_audio_isocirq(struct urb *urb) ...@@ -163,10 +163,9 @@ static void em28xx_audio_isocirq(struct urb *urb)
urb->status = 0; urb->status = 0;
status = usb_submit_urb(urb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status < 0) { if (status < 0)
em28xx_errdev("resubmit of audio urb failed (error=%i)\n", em28xx_errdev("resubmit of audio urb failed (error=%i)\n",
status); status);
}
return; return;
} }
...@@ -183,7 +182,8 @@ static int em28xx_init_audio_isoc(struct em28xx *dev) ...@@ -183,7 +182,8 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC); errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC);
if (errCode) { if (errCode) {
em28xx_errdev("submit of audio urb failed\n"); em28xx_errdev("submit of audio urb failed (error=%i)\n",
errCode);
em28xx_deinit_isoc_audio(dev); em28xx_deinit_isoc_audio(dev);
atomic_set(&dev->stream_started, 0); atomic_set(&dev->stream_started, 0);
return errCode; return errCode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment