Commit eed04fa9 authored by Minas Harutyunyan's avatar Minas Harutyunyan Committed by Greg Kroah-Hartman
Browse files

usb: dwc2: host: Fix dereference issue in DDMA completion flow.

parent 3461e020
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -867,13 +867,15 @@ static int dwc2_cmpl_host_isoc_dma_desc(struct dwc2_hsotg *hsotg,
	struct dwc2_dma_desc *dma_desc;
	struct dwc2_hcd_iso_packet_desc *frame_desc;
	u16 frame_desc_idx;
	struct urb *usb_urb = qtd->urb->priv;
	struct urb *usb_urb;
	u16 remain = 0;
	int rc = 0;

	if (!qtd->urb)
		return -EINVAL;

	usb_urb = qtd->urb->priv;

	dma_sync_single_for_cpu(hsotg->dev, qh->desc_list_dma + (idx *
				sizeof(struct dwc2_dma_desc)),
				sizeof(struct dwc2_dma_desc),