Index: uspace/drv/bus/usb/xhci/hc.c
===================================================================
--- uspace/drv/bus/usb/xhci/hc.c	(revision afa347e3222f6e33540834377451c5c7d19c016e)
+++ uspace/drv/bus/usb/xhci/hc.c	(revision 5a9ae994d7a5f73d79d6c7d22892f159fb4d7926)
@@ -208,9 +208,9 @@
 
 	if ((err = xhci_scratchpad_alloc(hc)))
-		goto err_scratchpad;
-
-	return EOK;
-
-err_scratchpad:
+		goto err_event_ring;
+
+	return EOK;
+
+err_event_ring:
 	xhci_event_ring_fini(&hc->event_ring);
 err_cmd_ring:
@@ -437,8 +437,6 @@
 	xhci_scratchpad_free(hc);
 
-	/**
-	 * Idx 0 already deallocated by xhci_scratchpad_free.
-	 */
-	for (int i = 1; i < hc->max_slots + 1; ++i) {
+	/* Idx 0 already deallocated by xhci_scratchpad_free. */
+	for (unsigned i = 1; i < hc->max_slots + 1; ++i) {
 		if (hc->dcbaa[i] != NULL) {
 			free32(hc->dcbaa[i]);
