Some USB driver call usb_ep_disable() without calling usb_ep_enable(). But necessary pipe settings (which is needed on usb_ep_disable()) will be done in usb_ep_enable(). This patch ignore usb_ep_disable() until usb_ep_enable() was called. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- v1 -> v2 - add detail explain on log drivers/usb/renesas_usbhs/mod_gadget.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 44a6118..37845aa 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -515,6 +515,9 @@ static int usbhsg_ep_disable(struct usb_ep *ep) { struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); + if (!uep->pipe) + return 0; + return usbhsg_pipe_disable(uep); } -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html