This patch adds the label 'update_ring' for the common code path: inc_deq(xhci, xhci->cmd_ring); return; Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> --- drivers/usb/host/xhci-ring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index e13531f..03f65dc 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1522,10 +1522,8 @@ static void handle_cmd_completion(struct xhci_hcd *xhci, * been stopped by host. So we should handle it normally. * Otherwise, driver should invoke inc_deq() and return. */ - if (handle_stopped_cmd_ring(xhci, cmd_comp_code)) { - inc_deq(xhci, xhci->cmd_ring); - return; - } + if (handle_stopped_cmd_ring(xhci, cmd_comp_code)) + goto update_ring; } cmd_type = TRB_FIELD_TO_TYPE(le32_to_cpu(cmd_trb->generic.field[3])); @@ -1567,7 +1565,9 @@ static void handle_cmd_completion(struct xhci_hcd *xhci, xhci->error_bitmask |= 1 << 6; break; } +update_ring: inc_deq(xhci, xhci->cmd_ring); + return; } static void handle_vendor_event(struct xhci_hcd *xhci, -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html