This patch adds the label 'update_ring' for the common code path:
inc_deq(xhci, xhci->cmd_ring);
return;

Signed-off-by: Xenia Ragiadakou <burzalod...@gmail.com>
---

Differences from v3:

remove return statement

 drivers/usb/host/xhci-ring.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c7fe489..4af43ab 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1524,10 +1524,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;
        }
 
        WARN_ON(slot_id != TRB_TO_SLOT_ID(
@@ -1572,6 +1570,7 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
                xhci->error_bitmask |= 1 << 6;
                break;
        }
+update_ring:
        inc_deq(xhci, xhci->cmd_ring);
 }
 
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to