summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Laszczak <pawell@cadence.com>2024-08-20 10:21:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-22 11:15:35 +0200
commit0497a356d3c498221eb0c1edc1e8985816092f12 (patch)
tree164f3cdfaf397e6365a7fb8bb1bf7f3b96e6a51f
parentusb: dwc3: core: Prevent USB core invalid event buffer address access (diff)
downloadlinux-0497a356d3c498221eb0c1edc1e8985816092f12.tar.xz
linux-0497a356d3c498221eb0c1edc1e8985816092f12.zip
usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function
Patch fixes the incorrect "stream_id" table index instead of "ep_index" used in cdnsp_get_hw_deq function. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") cc: stable@vger.kernel.org Signed-off-by: Pawel Laszczak <pawell@cadence.com> Reviewed-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/PH7PR07MB95381F2182688811D5C711CEDD8D2@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/cdns3/cdnsp-ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c
index 02f297f5637d..a60c0cb991cd 100644
--- a/drivers/usb/cdns3/cdnsp-ring.c
+++ b/drivers/usb/cdns3/cdnsp-ring.c
@@ -402,7 +402,7 @@ static u64 cdnsp_get_hw_deq(struct cdnsp_device *pdev,
struct cdnsp_stream_ctx *st_ctx;
struct cdnsp_ep *pep;
- pep = &pdev->eps[stream_id];
+ pep = &pdev->eps[ep_index];
if (pep->ep_state & EP_HAS_STREAMS) {
st_ctx = &pep->stream_info.stream_ctx_array[stream_id];