linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jiri Slaby <jslaby@suse.cz>, Zou Wei <zou_wei@huawei.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart
Date: Tue, 28 Apr 2020 13:18:42 +0200	[thread overview]
Message-ID: <20200428111842.GA1159152@kroah.com> (raw)
In-Reply-To: <73c4cebb-467b-e5d5-89bf-8a6fe29cf858@gmail.com>

On Mon, Apr 27, 2020 at 10:29:58AM -0700, Florian Fainelli wrote:
> 
> 
> On 4/26/2020 11:19 PM, Jiri Slaby wrote:
> > On 21. 04. 20, 14:31, Zou Wei wrote:
> >> This patch fixes below error reported by coccicheck
> >>
> >> drivers/tty/serial/bcm63xx_uart.c:848:2-8: ERROR: missing clk_put;
> >> clk_get on line 842 and execution via conditional on line 846
> >>
> >> Fixes: ab4382d27412 ("tty: move drivers/serial/ to drivers/tty/serial/")
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> >> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> >> ---
> >>  drivers/tty/serial/bcm63xx_uart.c | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
> >> index 5674da2..ed0aa5c 100644
> >> --- a/drivers/tty/serial/bcm63xx_uart.c
> >> +++ b/drivers/tty/serial/bcm63xx_uart.c
> >> @@ -843,8 +843,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
> >>  	if (IS_ERR(clk) && pdev->dev.of_node)
> >>  		clk = of_clk_get(pdev->dev.of_node, 0);
> >>  
> >> -	if (IS_ERR(clk))
> >> +	if (IS_ERR(clk)) {
> >> +		clk_put(clk);
> > 
> > Why would you want to put an erroneous clk?
> 
> Doh, somehow I completely missed, you are right this does not look legit.

Ugh, can you send a revert for this please?

thanks,

greg k-h

  reply	other threads:[~2020-04-28 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 12:31 [PATCH -next] tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart Zou Wei
2020-04-23 15:46 ` Florian Fainelli
2020-04-27  6:19 ` Jiri Slaby
2020-04-27 17:29   ` Florian Fainelli
2020-04-28 11:18     ` Greg KH [this message]
2020-05-01  1:40       ` Florian Fainelli

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=20200428111842.GA1159152@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=zou_wei@huawei.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).