linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
Date: Thu, 5 Oct 2023 11:19:57 +0100	[thread overview]
Message-ID: <ZR6NzUUP2gg3nNiC@pluto> (raw)
In-Reply-To: <20231004193600.66232-1-sudeep.holla@arm.com>

On Wed, Oct 04, 2023 at 08:36:00PM +0100, Sudeep Holla wrote:
> Add the missing devm_kfree() when we skip the clocks with invalid or
> missing information from the firmware.
> 

Hi,

LGTM.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>

Thanks,
Cristian

> Cc: Cristian Marussi <cristian.marussi@arm.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Fixes: 6d6a1d82eaef ("clk: add support for clocks provided by SCMI")
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/clk/clk-scmi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
> index 2e1337b511eb..3f525bed9794 100644
> --- a/drivers/clk/clk-scmi.c
> +++ b/drivers/clk/clk-scmi.c
> @@ -232,6 +232,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
>  		sclk->info = scmi_proto_clk_ops->info_get(ph, idx);
>  		if (!sclk->info) {
>  			dev_dbg(dev, "invalid clock info for idx %d\n", idx);
> +			devm_kfree(dev, sclk);
>  			continue;
>  		}
>  
> -- 
> 2.42.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-10-05 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 19:36 [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped Sudeep Holla
2023-10-05 10:19 ` Cristian Marussi [this message]
2023-10-09 11:14 ` Sudeep Holla
2023-10-19  0:54 ` Stephen Boyd

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=ZR6NzUUP2gg3nNiC@pluto \
    --to=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.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).