From: sashiko-bot@kernel.org
To: phucduc.bui@gmail.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2 2/2] usb: chipidea: ci_hdrc_imx: Fix error handling when creating IRQ name
Date: Fri, 07 Aug 2026 07:05:10 +0000 [thread overview]
Message-ID: <20260807070724.DE0691F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260807065619.30604-2-phucduc.bui@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Error paths for wakeup IRQ allocation bypass the USB PHY shutdown, leading to a resource leak.
--
--- Patch [2]: [PATCH v2 2/2] usb: chipidea: ci_hdrc_imx: Fix error handling when creating IRQ name ---
commit 3a41f09eeb5ba5b2ec80f3833ced7293b9a2ffe6
Author: bui duc phuc <phucduc.bui@gmail.com>
usb: chipidea: ci_hdrc_imx: Fix error handling when creating IRQ name
This patch fixes a bug where the failure of devm_kasprintf() during wakeup
IRQ name allocation was logged but not propagated. It assigns the result of
dev_err_probe() to the return variable to properly fail the probe.
Link: https://lore.kernel.org/all/20260806065755.C9F361F000E9@smtp.kernel.org/
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 7387c9903e800..ec2280ae82dc5 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -532,7 +532,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
> if (data->wakeup_irq > 0) {
> irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s:wakeup", pdata.name);
> if (!irq_name) {
> - dev_err_probe(dev, -ENOMEM, "failed to create irq_name\n");
> + ret = dev_err_probe(dev, -ENOMEM, "failed to create irq_name\n");
> goto err_clk;
[Severity: High]
This is a pre-existing issue, but does this error path bypass the USB PHY
shutdown, leading to a resource leak?
If usb_phy_init() was called earlier in ci_hdrc_imx_probe(), jumping directly
to err_clk skips the phy_shutdown label. This leaks the PHY initialization
state (such as clocks and regulators).
If probe defers or fails here, this could cause regulator and clock enable
counts to increase endlessly on subsequent probe attempts.
Should this goto point to phy_shutdown instead?
> }
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260807065619.30604-1-phucduc.bui@gmail.com?part=2
next prev parent reply other threads:[~2026-08-07 7:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 6:56 [PATCH v2 1/2] usb: chipidea: ci_hdrc_imx: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-07 6:56 ` [PATCH v2 2/2] usb: chipidea: ci_hdrc_imx: Fix error handling when creating IRQ name phucduc.bui
2026-08-07 7:05 ` sashiko-bot [this message]
2026-08-07 9:20 ` Peter Chen
2026-08-07 19:18 ` Frank Li
2026-08-07 7:03 ` [PATCH v2 1/2] usb: chipidea: ci_hdrc_imx: Propagate errors from optional IRQ lookup sashiko-bot
2026-08-07 19:20 ` Frank Li
2026-08-08 9:13 ` Bui Duc Phuc
2026-08-07 9:16 ` Peter Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260807070724.DE0691F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=phucduc.bui@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.