All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Mans Rullgard <mans@mansr.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Marc Gonzalez <marc.w.gonzalez@free.fr>,
	Xidong Wang <wangxidong_97@163.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v2] mtd: rawnand: tango: Fix struct clk memory leak
Date: Tue, 24 Apr 2018 17:50:17 +0200	[thread overview]
Message-ID: <20180424175017.298370fa@bbrezillon> (raw)
In-Reply-To: <8cffd501-b83f-8140-9cc6-021fcd90e277@sigmadesigns.com>

On Thu, 5 Apr 2018 14:57:59 +0200
Marc Gonzalez <marc_gonzalez@sigmadesigns.com> wrote:

> Use devm_clk_get() to let Linux manage struct clk memory.
> 
> Fixes: 6956e2385a16 ("add tango NAND flash controller support")
> Reported-by: Xidong Wang <wangxidong_97@163.com>
> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>

Applied.

Thanks,

Boris

> ---
> Missing clk_prepare_enable() would be handled in a separate patch.
> ---
>  drivers/mtd/nand/tango_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
> index c5bee00b7f5e..76761b841f1f 100644
> --- a/drivers/mtd/nand/tango_nand.c
> +++ b/drivers/mtd/nand/tango_nand.c
> @@ -643,7 +643,7 @@ static int tango_nand_probe(struct platform_device *pdev)
>  
>  	writel_relaxed(MODE_RAW, nfc->pbus_base + PBUS_PAD_MODE);
>  
> -	clk = clk_get(&pdev->dev, NULL);
> +	clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(clk))
>  		return PTR_ERR(clk);
>  

      parent reply	other threads:[~2018-04-24 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04  3:05 [PATCH 1/1] mtd:nand:fix memory leak Xidong Wang
2018-04-04  3:05 ` Xidong Wang
2018-04-04  6:28 ` Miquel Raynal
2018-04-04  7:07   ` Boris Brezillon
2018-04-04  7:08     ` Boris Brezillon
2018-04-05  9:12       ` Marc Gonzalez
2018-04-05  9:44         ` Miquel Raynal
2018-04-05 11:04           ` Boris Brezillon
2018-04-05  9:54         ` Boris Brezillon
2018-04-05 11:26           ` Marc Gonzalez
2018-04-05 11:47             ` Boris Brezillon
2018-04-05 12:00               ` Marc Gonzalez
2018-04-05 12:57     ` [PATCH v2] mtd: rawnand: tango: Fix struct clk " Marc Gonzalez
2018-04-05 14:22       ` Miquel Raynal
2018-04-24 15:50       ` Boris Brezillon [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=20180424175017.298370fa@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mans@mansr.com \
    --cc=marc.w.gonzalez@free.fr \
    --cc=marc_gonzalez@sigmadesigns.com \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=wangxidong_97@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.