forked from Minki/linux
ALSA: usx2y: Use common error handling code in submit_urbs()
Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
80753cdfef
commit
d2d9770879
@ -352,20 +352,22 @@ static int submit_urbs(struct usb_stream_kernel *sk,
|
|||||||
int err;
|
int err;
|
||||||
prepare_inurb(sk->idle_outurb->number_of_packets, sk->idle_inurb);
|
prepare_inurb(sk->idle_outurb->number_of_packets, sk->idle_inurb);
|
||||||
err = usb_submit_urb(sk->idle_inurb, GFP_ATOMIC);
|
err = usb_submit_urb(sk->idle_inurb, GFP_ATOMIC);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
snd_printk(KERN_ERR "%i\n", err);
|
goto report_failure;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
sk->idle_inurb = sk->completed_inurb;
|
sk->idle_inurb = sk->completed_inurb;
|
||||||
sk->completed_inurb = inurb;
|
sk->completed_inurb = inurb;
|
||||||
err = usb_submit_urb(sk->idle_outurb, GFP_ATOMIC);
|
err = usb_submit_urb(sk->idle_outurb, GFP_ATOMIC);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
snd_printk(KERN_ERR "%i\n", err);
|
goto report_failure;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
sk->idle_outurb = sk->completed_outurb;
|
sk->idle_outurb = sk->completed_outurb;
|
||||||
sk->completed_outurb = outurb;
|
sk->completed_outurb = outurb;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
report_failure:
|
||||||
|
snd_printk(KERN_ERR "%i\n", err);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_LOOP_BACK
|
#ifdef DEBUG_LOOP_BACK
|
||||||
|
Loading…
Reference in New Issue
Block a user