diff mbox series

usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function

Message ID PH7PR07MB95381F2182688811D5C711CEDD8D2@PH7PR07MB9538.namprd07.prod.outlook.com
State New
Headers show
Series usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function | expand

Commit Message

Pawel Laszczak Aug. 20, 2024, 8:21 a.m. UTC
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>
---
 drivers/usb/cdns3/cdnsp-ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Chen Aug. 21, 2024, 10:23 a.m. UTC | #1
On 24-08-20 08:21:19, Pawel Laszczak wrote:
> 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>
> ---
>  drivers/usb/cdns3/cdnsp-ring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c
> index 75724e60653c..e0e97a138666 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];
> -- 
> 2.43.0
> 

Reviewed-by: Peter Chen <peter.chen@kernel.org>

Peter
diff mbox series

Patch

diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c
index 75724e60653c..e0e97a138666 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];