usb: cdnsp: Fix incorrect status for control request
authorPawel Laszczak <pawell@cadence.com>
Tue, 7 Dec 2021 09:18:38 +0000 (10:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Dec 2021 14:23:42 +0000 (15:23 +0100)
Patch fixes incorrect status for control request.
Without this fix all usb_request objects were returned to upper drivers
with usb_reqest->status field set to -EINPROGRESS.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: <stable@vger.kernel.org>
Reported-by: Ken (Jian) He <jianhe@ambarella.com>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20211207091838.39572-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdnsp-ring.c

index e1ac6c398bd36b260c009066d18931cb98560555..e45c3d6e1536cf6dba325fef8ce925c35f0eb9e8 100644 (file)
@@ -1029,6 +1029,8 @@ static void cdnsp_process_ctrl_td(struct cdnsp_device *pdev,
                return;
        }
 
+       *status = 0;
+
        cdnsp_finish_td(pdev, td, event, pep, status);
 }