summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/drivers/usb/dwc2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/dwc2.c b/payloads/libpayload/drivers/usb/dwc2.c
index 30e00fba64..0941eb64d1 100644
--- a/payloads/libpayload/drivers/usb/dwc2.c
+++ b/payloads/libpayload/drivers/usb/dwc2.c
@@ -323,8 +323,10 @@ dwc2_split_transfer(endpoint_t *ep, int size, int pid, ep_dir_t dir,
do {
hfnum.d32 = readl(&reg->host.hfnum);
- if (dwc2_disconnected(ep->dev->controller))
- return -HCSTAT_DISCONNECTED;
+ if (dwc2_disconnected(ep->dev->controller)) {
+ ret = -HCSTAT_DISCONNECTED;
+ goto out;
+ }
} while (hfnum.frnum % 8 != 0);
/* Handle Start-Split */