return ret;
 }
 
-static void xhci_handle_halted_endpoint(struct xhci_hcd *xhci,
+static int xhci_handle_halted_endpoint(struct xhci_hcd *xhci,
                                struct xhci_virt_ep *ep, unsigned int stream_id,
                                struct xhci_td *td,
                                enum xhci_ep_reset_type reset_type)
         * Device will be reset soon to recover the link so don't do anything
         */
        if (ep->vdev->flags & VDEV_PORT_ERROR)
-               return;
+               return -ENODEV;
 
        /* add td to cancelled list and let reset ep handler take care of it */
        if (reset_type == EP_HARD_RESET) {
 
        if (ep->ep_state & EP_HALTED) {
                xhci_dbg(xhci, "Reset ep command already pending\n");
-               return;
+               return 0;
        }
 
        err = xhci_reset_halted_ep(xhci, slot_id, ep->ep_index, reset_type);
        if (err)
-               return;
+               return err;
 
        ep->ep_state |= EP_HALTED;
 
        xhci_ring_cmd_db(xhci);
+
+       return 0;
 }
 
 /*
        struct xhci_td *td = NULL;
        enum xhci_ep_reset_type reset_type;
        struct xhci_command *command;
+       int err;
 
        if (unlikely(TRB_TO_SUSPEND_PORT(le32_to_cpu(trb->generic.field[3])))) {
                if (!xhci->devs[slot_id])
                                        td->status = -EPROTO;
                        }
                        /* reset ep, reset handler cleans up cancelled tds */
-                       xhci_handle_halted_endpoint(xhci, ep, 0, td, reset_type);
+                       err = xhci_handle_halted_endpoint(xhci, ep, 0, td,
+                                                         reset_type);
+                       if (err)
+                               break;
                        xhci_stop_watchdog_timer_in_irq(xhci, ep);
                        return;
                case EP_STATE_RUNNING: