diff options
| author | Felipe Balbi <balbi@ti.com> | 2014-09-29 15:23:41 -0400 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2014-10-20 16:58:49 -0400 |
| commit | f3bb7b298120df8a9b7354e4f6d07e3185c15db7 (patch) | |
| tree | 8cbaff1c898ebe1e18a9987fba575e1baeb81b28 | |
| parent | 703a303c187ef7e3c8daf8a1be343576c9579eaf (diff) | |
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>
| -rw-r--r-- | drivers/usb/gadget/function/f_uac2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index fa511180c241..1146f4d5f66d 100644 --- a/drivers/usb/gadget/function/f_uac2.c +++ b/drivers/usb/gadget/function/f_uac2.c | |||
| @@ -951,6 +951,9 @@ free_ep(struct uac2_rtd_params *prm, struct usb_ep *ep) | |||
| 951 | struct snd_uac2_chip *uac2 = prm->uac2; | 951 | struct snd_uac2_chip *uac2 = prm->uac2; |
| 952 | int i; | 952 | int i; |
| 953 | 953 | ||
| 954 | if (!prm->ep_enabled) | ||
| 955 | return; | ||
| 956 | |||
| 954 | prm->ep_enabled = false; | 957 | prm->ep_enabled = false; |
| 955 | 958 | ||
| 956 | for (i = 0; i < USB_XFERS; i++) { | 959 | for (i = 0; i < USB_XFERS; i++) { |
