mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Liang He <windhl@126.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: host: ohci-ppc-of: Fix refcount leak bug
Date: Fri, 17 Jun 2022 11:15:35 -0400	[thread overview]
Message-ID: <Yqyal2aXvZRebui+@rowland.harvard.edu> (raw)
In-Reply-To: <20220617034637.4003115-1-windhl@126.com>

On Fri, Jun 17, 2022 at 11:46:37AM +0800, Liang He wrote:
> In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return
> a node pointer with refcount incremented. We should use of_node_put()
> when it is not used anymore.
> 
> Signed-off-by: Liang He <windhl@126.com>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

This seems to be the last one; ehci-ppc-of.c was already fixed by an 
earlier patch.

>  drivers/usb/host/ohci-ppc-of.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
> index 1960b8dfdba5..591f675cc930 100644
> --- a/drivers/usb/host/ohci-ppc-of.c
> +++ b/drivers/usb/host/ohci-ppc-of.c
> @@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
>  				release_mem_region(res.start, 0x4);
>  		} else
>  			pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
> +		of_node_put(np);
>  	}
>  
>  	irq_dispose_mapping(irq);
> -- 
> 2.25.1
> 

      reply	other threads:[~2022-06-17 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  3:46 Liang He
2022-06-17 15:15 ` 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=Yqyal2aXvZRebui+@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=windhl@126.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®