linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>
Subject: Re: [PATCH] clk: fsl-sai: fix memory leak
Date: Thu, 05 Nov 2020 08:50:59 +0100	[thread overview]
Message-ID: <93b003ea4b80e0b6ec3eb63288e028eb@walle.cc> (raw)
In-Reply-To: <160453619129.3965362.7473462251338349415@swboyd.mtv.corp.google.com>

Am 2020-11-05 01:29, schrieb Stephen Boyd:
> Quoting Michael Walle (2020-11-01 10:48:18)
>> diff --git a/drivers/clk/clk-fsl-sai.c b/drivers/clk/clk-fsl-sai.c
>> index 0221180a4dd7..1e81c8d8a6fd 100644
>> --- a/drivers/clk/clk-fsl-sai.c
>> +++ b/drivers/clk/clk-fsl-sai.c
>> @@ -68,9 +68,20 @@ static int fsl_sai_clk_probe(struct platform_device 
>> *pdev)
>>         if (IS_ERR(hw))
>>                 return PTR_ERR(hw);
>> 
>> +       platform_set_drvdata(pdev, hw);
>> +
>>         return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, 
>> hw);
>>  }
>> 
>> +static int fsl_sai_clk_remove(struct platform_device *pdev)
>> +{
>> +       struct clk_hw *hw = platform_get_drvdata(pdev);
>> +
>> +       clk_hw_unregister_composite(hw);
> 
> Should we add a devm_clk_hw_register_composite() API and use it here?
> That way we don't need a remove function and devm can be used
> throughout.

Can do. But does adding a devm_ function qualify for the -stable branch?
Or should I expect to have exactly this patch as a backport there then?

-michael

      reply	other threads:[~2020-11-05  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 18:48 [PATCH] clk: fsl-sai: fix memory leak Michael Walle
2020-11-05  0:29 ` Stephen Boyd
2020-11-05  7:50   ` Michael Walle [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=93b003ea4b80e0b6ec3eb63288e028eb@walle.cc \
    --to=michael@walle.cc \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).