mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
FROMLIST: usb: dwc2: Fix NULL qh in dwc2_queue_transaction
When a usb device disconnects in a certain way, dwc2_queue_transaction still gets called after dwc2_hcd_cleanup_channels. dwc2_hcd_cleanup_channels does "channel->qh = NULL;" but dwc2_queue_transaction still wants to dereference qh. This adds a check for a null qh. (am from https://patchwork.kernel.org/patch/7245251/) Change-Id: Ia9c7f5febe0bb6f0123cfc85c90beb9fc1d80bdd Signed-off-by: Alexandru M Stan <amstan@chromium.org> Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
This commit is contained in:
@@ -3019,7 +3019,7 @@ static int dwc2_queue_transaction(struct dwc2_hsotg *hsotg,
|
||||
list_move_tail(&chan->split_order_list_entry,
|
||||
&hsotg->split_order);
|
||||
|
||||
if (hsotg->params.host_dma) {
|
||||
if (hsotg->params.host_dma && chan->qh) {
|
||||
if (hsotg->params.dma_desc_enable) {
|
||||
if (!chan->xfer_started ||
|
||||
chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
|
||||
|
||||
Reference in New Issue
Block a user