Files
Gabriel FernandezandYann Gautier 6fb522dec0 fix(st-clock): prevent panic when external oscillator is absent
To deactivate the external oscillator, the frequency must be set to 0
in the device tree.
The frequency check for 0 was implemented in clk_stm32_osc_gate_enable()
and clk_stm32_osc_gate_disable(), but missing in
clk_stm32_osc_gate_is_enabled().
Since clk_stm32_osc_gate_is_enabled() is called by clk_enable()
to verify if the clock is actually enabled, this fix prevents a panic
when the oscillator is not present.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Change-Id: I90dc671f39bd46d0db19d7532aee9ec7b449ba9d
2025-10-30 13:49:16 +01:00
..