Re: [PATCH] [v3] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-10-28 Thread Maxime Ripard
On Tue, Oct 20, 2020 at 02:12:26PM +0800, Dinghao Liu wrote: > When clk_hw_register_fixed_rate_with_accuracy() fails, > clk_data should be freed. It's the same for the subsequent > two error paths, but we should also unregister the already > registered clocks in them. > > Signed-off-by: Dinghao

Re: [PATCH] [v3] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-10-28 Thread Alexandre Belloni
On Tue, 20 Oct 2020 14:12:26 +0800, Dinghao Liu wrote: > When clk_hw_register_fixed_rate_with_accuracy() fails, > clk_data should be freed. It's the same for the subsequent > two error paths, but we should also unregister the already > registered clocks in them. Applied, thanks! [1/1] rtc:

[PATCH] [v3] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-10-20 Thread Dinghao Liu
When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by: Dinghao Liu --- Changelog: v2: - Unregister the already registered clocks on