usb: gadget: function: uac2: prevent double ep disable

without this check, f_uac2 would try to disable
the same endpoint twice. Fix that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Felipe Balbi 2014-09-29 14:23:41 -05:00
parent 703a303c18
commit f3bb7b2981
1 changed files with 3 additions and 0 deletions

View File

@ -951,6 +951,9 @@ free_ep(struct uac2_rtd_params *prm, struct usb_ep *ep)
struct snd_uac2_chip *uac2 = prm->uac2;
int i;
if (!prm->ep_enabled)
return;
prm->ep_enabled = false;
for (i = 0; i < USB_XFERS; i++) {