Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3bb7b29 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

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: default avatarFelipe Balbi <balbi@ti.com>
parent 703a303c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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++) {