Re: [PATCH] clk: Unlink clock if failed to prepare or enable

From: Stephen Boyd
Date: Tue May 05 2020 - 15:12:06 EST


Quoting Marc Zyngier (2020-05-05 07:09:53)
> On failing to prepare or enable a clock, remove the core structure
> from the list it has been inserted as it is about to be freed.
>
> This otherwise leads to random crashes when subsequent clocks get
> registered, during which parsing of the clock tree becomes adventurous.
>
> Observed with QEMU's RPi-3 emulation.
>
> Fixes: 12ead77432f2 ("clk: Don't try to enable critical clocks if prepare failed")
> Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxx>
> Cc: Michael Turquette <mturquette@xxxxxxxxxxxx>
> ---

Applied to clk-fixes