Re: [PATCH master] mfd: syscon: don't register clocked syscon if geting clock fails

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:55:22PM +0100, Ahmad Fatoum wrote: > When of_syscon_register is called with check_clk=true, it will attempt > to attach the clock. If that fails, the newly allocated syscon is freed, > but a dangling pointer remained in the syscon_list. > > Fix this by only registering t

[PATCH master] mfd: syscon: don't register clocked syscon if geting clock fails

2023-11-09 Thread Ahmad Fatoum
When of_syscon_register is called with check_clk=true, it will attempt to attach the clock. If that fails, the newly allocated syscon is freed, but a dangling pointer remained in the syscon_list. Fix this by only registering the syscon in the successful case. Fixes: b36b7b727192 ("mfd: syscon: cl