From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Bin Liu <b-liu@ti.com>, Roger Quadros <rogerq@ti.com>,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: musb: Fix missing of_node_put() in omap2430_probe
Date: Wed, 9 Mar 2022 12:25:03 +0100 [thread overview]
Message-ID: <YiiOj3n3ocUr+/68@kroah.com> (raw)
In-Reply-To: <20220309111033.24487-1-linmq006@gmail.com>
On Wed, Mar 09, 2022 at 11:10:33AM +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
>
> Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/usb/musb/omap2430.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 7d4d0713f4f0..4a963cfa385b 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -363,6 +363,7 @@ static int omap2430_probe(struct platform_device *pdev)
> control_node = of_parse_phandle(np, "ctrl-module", 0);
> if (control_node) {
> control_pdev = of_find_device_by_node(control_node);
> + of_node_put(control_node);
> if (!control_pdev) {
> dev_err(&pdev->dev, "Failed to get control device\n");
> ret = -EINVAL;
> --
> 2.17.1
>
How was this tested?
next prev parent reply other threads:[~2022-03-09 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 11:10 [PATCH] usb: musb: Fix missing of_node_put() in omap2430_probe Miaoqian Lin
2022-03-09 11:25 ` Greg Kroah-Hartman [this message]
2022-04-08 1:54 ` Miaoqian Lin
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=YiiOj3n3ocUr+/68@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=b-liu@ti.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rogerq@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;
as well as URLs for NNTP newsgroup(s).