Skip to content

Commit 0654ff1

Browse files
committed
Revert "xhci-hub: Handle error condition with xhci_stop_device"
This is present in upstream as commit aaa7d1a ("usb: xhci: Handle error condition in xhci_stop_device()"), which has a slightly better resolution (since it went through the upstream review process). This reverts commit fdb6672. Signed-off-by: Nathan Chancellor <[email protected]>
1 parent d690a6f commit 0654ff1

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

drivers/usb/host/xhci-hub.c

+3-14
Original file line numberDiff line numberDiff line change
@@ -294,20 +294,11 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
294294
return -ENOMEM;
295295

296296
}
297-
298-
ret = xhci_queue_stop_endpoint(xhci, command, slot_id,
299-
i, suspend);
300-
if (ret) {
301-
spin_unlock_irqrestore(&xhci->lock, flags);
302-
goto err_cmd_queue;
303-
}
297+
xhci_queue_stop_endpoint(xhci, command, slot_id, i,
298+
suspend);
304299
}
305300
}
306-
ret = xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
307-
if (ret) {
308-
spin_unlock_irqrestore(&xhci->lock, flags);
309-
goto err_cmd_queue;
310-
}
301+
xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
311302
xhci_ring_cmd_db(xhci);
312303
spin_unlock_irqrestore(&xhci->lock, flags);
313304

@@ -318,8 +309,6 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
318309
xhci_warn(xhci, "Timeout while waiting for stop endpoint command\n");
319310
ret = -ETIME;
320311
}
321-
322-
err_cmd_queue:
323312
xhci_free_command(xhci, cmd);
324313
return ret;
325314
}

0 commit comments

Comments
 (0)