Commit e7a0ed3f authored by Michał Mirosław's avatar Michał Mirosław Committed by Felipe Balbi

usb: gadget: f_acm: don't disable disabled EP

Make debugging real problems easier by not trying to disable an EP that
was not yet enabled.
Reviewed-by: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent a1c0169a
...@@ -425,9 +425,11 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt) ...@@ -425,9 +425,11 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
/* we know alt == 0, so this is an activation or a reset */ /* we know alt == 0, so this is an activation or a reset */
if (intf == acm->ctrl_id) { if (intf == acm->ctrl_id) {
dev_vdbg(&cdev->gadget->dev, if (acm->notify->enabled) {
"reset acm control interface %d\n", intf); dev_vdbg(&cdev->gadget->dev,
usb_ep_disable(acm->notify); "reset acm control interface %d\n", intf);
usb_ep_disable(acm->notify);
}
if (!acm->notify->desc) if (!acm->notify->desc)
if (config_ep_by_speed(cdev->gadget, f, acm->notify)) if (config_ep_by_speed(cdev->gadget, f, acm->notify))
......
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