The removed condition is always true, since the endpoint descriptor is set prior to calling the enable endpoint. Signed-off-by: Ido Shayevitz <idos@xxxxxxxxxxxxxx> --- drivers/usb/gadget/langwell_udc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index e119519..5e4fcc3 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -257,7 +257,7 @@ static int langwell_ep_enable(struct usb_ep *_ep, dev = ep->dev; dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__); - if (!_ep || !desc || ep->ep.desc + if (!_ep || !desc || desc->bDescriptorType != USB_DT_ENDPOINT) return -EINVAL; -- 1.7.6 Consultant for Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum -- 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