From dbe68462fa656078eac3a5a09039038dc47e08da Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Fri, 11 Sep 2026 12:10:43 +0700 Subject: [PATCH] usb: chipidea: ci_hdrc_imx: Fix error handling when creating IRQ name devm_kasprintf() can fail when allocating the wakeup IRQ name. In this case, the probe error path should shut down the PHY before returning. Use the phy_shutdown error path instead of err_clk so that the PHY is properly shut down when creating the IRQ name or requesting the wakeup IRQ fails. Reviewed-by: Frank Li Acked-by: Peter Chen Reported-by: Sashiko Bot Link: https://lore.kernel.org/all/20260806065755.C9F361F000E9@smtp.kernel.org/ Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260911051043.15962-1-phucduc.bui@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/ci_hdrc_imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 6a17b22047b3..edbf9df9b8f2 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -533,7 +533,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s:wakeup", pdata.name); if (!irq_name) { ret = dev_err_probe(dev, -ENOMEM, "failed to create irq_name\n"); - goto err_clk; + goto phy_shutdown; } ret = devm_request_threaded_irq(dev, data->wakeup_irq, @@ -541,7 +541,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) IRQF_ONESHOT | IRQF_NO_AUTOEN, irq_name, data); if (ret) - goto err_clk; + goto phy_shutdown; } ret = imx_usbmisc_init(data->usbmisc_data); -- knotmirror 0.0.1