usb: dwc3: gadget: warn about endpoint already enabled before changing ep name
authorFelipe Balbi <balbi@ti.com>
Wed, 15 Aug 2012 09:28:29 +0000 (12:28 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 15 Aug 2012 09:28:29 +0000 (12:28 +0300)
commitc6f83f386c2f7987a344368e33e55840c12bd38f
tree4d1e36e1b87fc5b1f5931c7e9c5e6b858c675d83
parentb7e38aa67d73cbb9d5d2e1e5de379f473fa7d7bf
usb: dwc3: gadget: warn about endpoint already enabled before changing ep name

In case some gadget driver tries to enable an endpoint
which is already enabled, we print a nice WARN so we
can track broken gadget drivers. The only problem is that
we're printing the WARN when we already changed endpoint's
name, which would result in endpoints named as:

ep1in-bulk-bulk-bulk-bulk-bulk-bulk-bulk

To prevent that, we will continue to print the WARN,
but do so before changing endpoint's name and return
early.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c
This page took 0.024966 seconds and 5 git commands to generate.