usb: dwc2: gadget: Check for ep0 in enable
authorVahram Aharonyan <vahrama@synopsys.com>
Thu, 28 Apr 2016 03:20:46 +0000 (20:20 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 28 Apr 2016 06:40:16 +0000 (09:40 +0300)
commit8c3d609275f7f39d308e5c40a6220c67454f7a28
tree68736b2d5917d6d502270270f785570b53a73276
parent7b9cc7a2b101cc73f6abe3468441381c98817e54
usb: dwc2: gadget: Check for ep0 in enable

Replaced the WARN_ON with a check and return of -EINVAL in the
dwc2_hsotg_ep_enable function if ep0 is passed in.

Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c