From: Felix Gu <ustc.gu@gmail.com>
To: "Peter Griffin" <peter.griffin@linaro.org>,
"André Draszik" <andre.draszik@linaro.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Thinh Nguyen" <Thinh.Nguyen@synopsys.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Joy Chakraborty" <joychakr@google.com>,
"Roy Luo" <royluo@google.com>,
"Naveen Kumar" <mnkumar@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH] dwc3: google: Fix PM domain leak in dwc3_google_probe()
Date: Mon, 16 Mar 2026 23:30:06 +0800 [thread overview]
Message-ID: <20260316-dwc3-google-v1-1-c9bde1b02f62@gmail.com> (raw)
When syscon_regmap_lookup_by_phandle_args() fails, the function was
returning directly without cleaning up the power domain initialized
earlier by dwc3_google_pm_domain_init().
Fix by jumping to err_deinit_pdom to properly clean up resources.
Fixes: 8995a37371bf4 ("usb: dwc3: Add Google Tensor SoC DWC3 glue driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/usb/dwc3/dwc3-google.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-google.c b/drivers/usb/dwc3/dwc3-google.c
index 2105c72af753..4ca567ec01d0 100644
--- a/drivers/usb/dwc3/dwc3-google.c
+++ b/drivers/usb/dwc3/dwc3-google.c
@@ -385,8 +385,9 @@ static int dwc3_google_probe(struct platform_device *pdev)
"google,usb-cfg-csr",
ARRAY_SIZE(args), args);
if (IS_ERR(google->usb_cfg_regmap)) {
- return dev_err_probe(dev, PTR_ERR(google->usb_cfg_regmap),
- "invalid usb cfg csr\n");
+ ret = dev_err_probe(dev, PTR_ERR(google->usb_cfg_regmap),
+ "invalid usb cfg csr\n");
+ goto err_deinit_pdom;
}
google->host_cfg_offset = args[0];
---
base-commit: b84a0ebe421ca56995ff78b66307667b62b3a900
change-id: 20260316-dwc3-google-fd617b3d19f5
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
next reply other threads:[~2026-03-16 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 15:30 Felix Gu [this message]
2026-03-18 1:14 ` [PATCH] dwc3: google: Fix PM domain leak in dwc3_google_probe() Thinh Nguyen
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=20260316-dwc3-google-v1-1-c9bde1b02f62@gmail.com \
--to=ustc.gu@gmail.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=andre.draszik@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=joychakr@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mnkumar@google.com \
--cc=peter.griffin@linaro.org \
--cc=royluo@google.com \
--cc=tudor.ambarus@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).