linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
@ 2023-10-04 19:36 Sudeep Holla
  2023-10-05 10:19 ` Cristian Marussi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sudeep Holla @ 2023-10-04 19:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Sudeep Holla, Cristian Marussi, Michael Turquette, Stephen Boyd,
	linux-clk

Add the missing devm_kfree() when we skip the clocks with invalid or
missing information from the firmware.

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  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
  2023-10-09 11:14 ` Sudeep Holla
  2023-10-19  0:54 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Cristian Marussi @ 2023-10-05 10:19 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: linux-arm-kernel, Michael Turquette, Stephen Boyd, linux-clk

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  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
@ 2023-10-09 11:14 ` Sudeep Holla
  2023-10-19  0:54 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Sudeep Holla @ 2023-10-09 11:14 UTC (permalink / raw)
  To: linux-arm-kernel, Sudeep Holla
  Cc: Cristian Marussi, Michael Turquette, Stephen Boyd, linux-clk

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

Hi Stephen,

Since you have acked other changes in the same driver and agreed to take it
via SoC tree, I have applied this simple fix.

Applied to sudeep.holla/linux (for-next/scmi/updates), thanks!

[1/1] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
      https://git.kernel.org/sudeep.holla/c/3537a75e73f3
--
Regards,
Sudeep


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  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
  2023-10-09 11:14 ` Sudeep Holla
@ 2023-10-19  0:54 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2023-10-19  0:54 UTC (permalink / raw)
  To: Sudeep Holla, linux-arm-kernel
  Cc: Sudeep Holla, Cristian Marussi, Michael Turquette, linux-clk

Quoting Sudeep Holla (2023-10-04 12:36:00)
> Add the missing devm_kfree() when we skip the clocks with invalid or
> missing information from the firmware.
> 
> 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>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-19  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-10-09 11:14 ` Sudeep Holla
2023-10-19  0:54 ` Stephen Boyd

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).