From 4364e0f8cfea4628f869b7193e5e58452786158d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 13 Mar 2025 15:33:38 +0000 Subject: [PATCH] Revert "usb: xhci: Fix NULL pointer dereference on certain command aborts" This reverts commit fd8bfaeba4a85b14427899adec0efb3954300653 which is commit 1e0a19912adb68a4b2b74fd77001c96cd83eb073 upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: Ie9a889c78ce912df4d19e8a3da0d00b2283d6546 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-ring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 08b016864fc0..a37b55b2e31f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -332,8 +332,7 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd *xhci, if ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) && !(xhci->xhc_state & XHCI_STATE_DYING)) { xhci->current_cmd = cur_cmd; - if (cur_cmd) - xhci_mod_cmd_timer(xhci); + xhci_mod_cmd_timer(xhci); xhci_ring_cmd_db(xhci); } }