From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michal Simek <michal.simek@amd.com>, Vignesh R <vigneshr@ti.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Piyush Mehta <piyush.mehta@amd.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] usb: dwc3: xilinx: add missing depopulate in probe error path
Date: Fri, 16 Aug 2024 22:32:54 +0000 [thread overview]
Message-ID: <20240816223249.is333ijscyc5ipto@synopsys.com> (raw)
In-Reply-To: <20240816075409.23080-2-krzysztof.kozlowski@linaro.org>
On Fri, Aug 16, 2024, Krzysztof Kozlowski wrote:
> Depopulate device in probe error paths to fix leak of children
> resources.
>
> Fixes: 53b5ff83d893 ("usb: dwc3: xilinx: improve error handling for PM APIs")
> Cc: stable@vger.kernel.org
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes in v2:
> 1. Add goto also on pm_runtime_resume_and_get() failure (Thinh)
> 2. Add Rb tag.
> ---
> drivers/usb/dwc3/dwc3-xilinx.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
> index bb4d894c16e9..f1298b1b4f84 100644
> --- a/drivers/usb/dwc3/dwc3-xilinx.c
> +++ b/drivers/usb/dwc3/dwc3-xilinx.c
> @@ -327,9 +327,14 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
> goto err_pm_set_suspended;
>
> pm_suspend_ignore_children(dev, false);
> - return pm_runtime_resume_and_get(dev);
> + ret = pm_runtime_resume_and_get(dev);
> + if (ret < 0)
> + goto err_pm_set_suspended;
> +
> + return 0;
>
> err_pm_set_suspended:
> + of_platform_depopulate(dev);
> pm_runtime_set_suspended(dev);
>
> err_clk_put:
> --
> 2.43.0
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
prev parent reply other threads:[~2024-08-16 22:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 7:54 [PATCH v2 1/2] usb: dwc3: omap: " Krzysztof Kozlowski
2024-08-16 7:54 ` [PATCH v2 2/2] usb: dwc3: xilinx: " Krzysztof Kozlowski
2024-08-16 22:32 ` Thinh Nguyen [this message]
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=20240816223249.is333ijscyc5ipto@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=grygorii.strashko@ti.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=piyush.mehta@amd.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®