[PATCH 2/3] clk: scmi: Fix priv initialization in scmi_clk_gate()

Peng Fan peng.fan at oss.nxp.com
Tue Dec 9 10:00:01 CET 2025


On Mon, Dec 08, 2025 at 02:51:26PM +0100, Patrice Chotard wrote:
>In scmi_clk_probe(), in case of CLK_CCF is not enabled, parent private
>data is not set, so in scmi_clk_gate(), an uninitialized priv struct is
>retrieved.
>
>SCMI request is performed either using scmi_clk_state_in_v1 or
>scmi_clk_state_in_v2 struct depending of the unpredictable value of
>priv->version which leads to error during SCMI clock enable.
>
>Issue detected on STM32MP157C-DK2 board using the SCMI device tree
>stm32mp157c-dk2-scmi.dts.
>
>Fixes: 0619cb32030b ("firmware: scmi: Add clock v3.2 CONFIG_SET support")
>
>Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
>

Reviewed-by: Peng Fan <peng.fan at nxp.com>


More information about the U-Boot mailing list