]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: dwc3: gadget: combine return points into a single one
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 12 Apr 2024 20:26:01 +0000 (22:26 +0200)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Thu, 16 May 2024 06:38:24 +0000 (08:38 +0200)
commit13395507ca1f48de25e70f4d27f709b1a4fa0a82
tree51092202616cfc0d89c391eceb56823d54de2a2b
parent371b379edbf3488d77bc321dc5d2a0e22e067744
usb: dwc3: gadget: combine return points into a single one

Upstream Linux commit c0ca324d09a0.

dwc3_send_gadget_ep_cmd() had three return
points. That becomes a pain to track when we need to
debug something or if we need to add more code
before returning.

Let's combine all three return points into a single
one just by introducing a local 'ret' variable.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-2-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
drivers/usb/dwc3/gadget.c