clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
Subsystems (2)
PATCH 1/1 clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
Add the missing devm_kfree() when we skip the clocks with invalid or missing information from the firmware.
--- drivers/clk/clk-scmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-scmi.c +1 -0
@@ -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 ; }
Signature · 1 line
2.42.0
Quoted 3 lines · Sudeep Holla
Add the missing
devm_kfree()when we skip the clocks with invalid or missing information from the firmware.
Hi,
LGTM.
Thanks,
Cristian
Quoted 25 lines
Cc Cristian Marussi <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Fixes 6d6a1d82eaef ("clk: add support for clocks provided by SCMI")Signed-off-by Sudeep Holla <[email protected]>--- drivers/clk/clk-scmi.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/clk-scmi.c +1
-0@@ -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 ; }Signature · 1 line
2.42.0
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sudeep Holla
AppliedQuoted 3 lines · Sudeep Holla
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
Quoting Sudeep Holla (2023-10-04 12:36:00)
Quoted 10 lines
Add the missing
devm_kfree()when we skip the clocks with invalid or missing information from the firmware.Cc Cristian Marussi <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Fixes 6d6a1d82eaef ("clk: add support for clocks provided by SCMI")Signed-off-by Sudeep Holla <[email protected]>---