mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: dinghao.liu@zju.edu.cn
To: "Geert Uytterhoeven" <geert@linux-m68k.org>
Cc: "Kangjie Lu" <kjlu@umn.edu>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: Re: [PATCH] [v3] clk: renesas: rcar-usb2-clock-sel: Fix error handling in rcar_usb2_clock_sel_probe
Date: Fri, 23 Apr 2021 16:07:51 +0800 (GMT+08:00)	[thread overview]
Message-ID: <2fd8490f.73bcd.178fdc55590.Coremail.dinghao.liu@zju.edu.cn> (raw)
In-Reply-To: <CAMuHMdVgtZkO3FfLOph41cXXJbSuc16UX1Z+fD0_iNN7nM-GtA@mail.gmail.com>

> Hi Dinghao,
> 
> On Thu, Apr 15, 2021 at 9:33 AM Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:
> > The error handling paths after pm_runtime_get_sync() has no
> > refcount decrement, which leads to refcount leak.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> > ---
> >
> > Changelog:
> >
> > v2: - Move the position of pm_runtime_enable,_get_sync().
> >       Use devm_clk_register() to simplify error handling.
> 
> Thanks for the update!
> 
> > --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> > +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> > @@ -131,7 +131,6 @@ static int rcar_usb2_clock_sel_remove(struct platform_device *pdev)
> >         struct usb2_clock_sel_priv *priv = platform_get_drvdata(pdev);
> 
>     warning: unused variable ‘priv’ [-Wunused-variable]
> 
> Have you compiled this?
> 

This is my carelessness, thanks for pointing out this. When we use 
devm_clk_hw_register(), we will not need to unregister priv->hw in 
rcar_usb2_clock_sel_remove(). So I think it's okay to remove 
platform_get_drvdata() in it to eliminate this warning.

Do you need a new version of patch to fix this warning?

Regards,
Dinghao

  reply	other threads:[~2021-04-23  8:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  7:33 Dinghao Liu
2021-04-23  7:46 ` Geert Uytterhoeven
2021-04-23  8:07   ` dinghao.liu [this message]
2021-04-23  8:15     ` Geert Uytterhoeven

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=2fd8490f.73bcd.178fdc55590.Coremail.dinghao.liu@zju.edu.cn \
    --to=dinghao.liu@zju.edu.cn \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=kjlu@umn.edu \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    /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®