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

2020-10-19 Thread dinghao . liu
> Hi, > > On Sun, Oct 18, 2020 at 03:28:10PM +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. > > > >

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

2020-10-19 Thread Maxime Ripard
Hi, On Sun, Oct 18, 2020 at 03:28:10PM +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:

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

2020-10-18 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