From: Alan Stern <stern@rowland.harvard.edu>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Roland Stigge <stigge@antcom.de>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe
Date: Fri, 3 Jun 2022 10:44:15 -0400 [thread overview]
Message-ID: <YpoePyzPNQZXhuNu@rowland.harvard.edu> (raw)
In-Reply-To: <20220603141231.979-1-linmq006@gmail.com>
On Fri, Jun 03, 2022 at 06:12:30PM +0400, Miaoqian Lin wrote:
> of_parse_phandle() returns a node pointer with refcount
> incremented, we should use of_node_put() on it when not need anymore.
> Add missing of_node_put() to avoid refcount leak.
>
> Fixes: 73108aa90cbf ("USB: ohci-nxp: Use isp1301 driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
Acked-by: Alan Stern <stern@rowland.harvard.edu>
> drivers/usb/host/ohci-nxp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
> index 85878e8ad331..106a6bcefb08 100644
> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -164,6 +164,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
> }
>
> isp1301_i2c_client = isp1301_get_client(isp1301_node);
> + of_node_put(isp1301_node);
> if (!isp1301_i2c_client)
> return -EPROBE_DEFER;
>
> --
> 2.25.1
>
prev parent reply other threads:[~2022-06-03 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 14:12 Miaoqian Lin
2022-06-03 14:44 ` Alan Stern [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=YpoePyzPNQZXhuNu@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stigge@antcom.de \
--cc=vz@mleia.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®