Re: [PATCH RESEND v3] usb: dwc3: qcom: check for hcd in dwc3_qcom_read_usb2_speed
From: Prashanth K
Date: Mon Nov 23 2026 - 01:01:45 EST
On 11/6/2026 10:46 AM, Prashanth K wrote:
> Currently dwc->xhci is not cleared if xhci_plat_probe() fails. During
> system suspend, dwc3_qcom_read_usb2_speed() checks dwc->xhci and assumes
> xhci is initialised. Since the probe failed, hcd will be null, and the
> subsequent access results in a NULL pointer dereference
>
> Unable to handle kernel NULL pointer dereference at
> virtual address 0000000000000058
>
> Call trace:
> dwc3_qcom_pm_suspend
> dpm_run_callback
> device_suspend
> dpm_suspend
> dpm_suspend_start
> suspend_devices_and_enter
> pm_suspend
>
> Explicitly check the hcd pointer in dwc3_qcom_read_usb2_speed
> before accessing it.
>
> Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend")
> Cc: stable <stable@xxxxxxxxxx>
> Acked-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
> Reviewed-by: Peter Chen <peter.chen@xxxxxxxxxxxxxxxx>
> Signed-off-by: Prashanth K <prashanth.k@xxxxxxxxxxxxxxxx>
> ---
> Resending with Cc stable tag and review tags.
> Sorry for the spam, Greg can you please review and pick this patch ?
Let me know if you need me to send v4 instead of RESEND.
Thanks in advance,
Prashanth K