]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
authorShuwei Wu <shuwei.wu@mailbox.org>
Thu, 5 Mar 2026 12:46:08 +0000 (20:46 +0800)
committerYixun Lan <dlan@kernel.org>
Tue, 24 Mar 2026 06:42:29 +0000 (06:42 +0000)
Fix inverted condition that skips frequency change trigger,
causing kernel panics during cpufreq scaling.

Fixes: 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://lore.kernel.org/r/20260305-k1-clk-fix-v1-1-abca85d6e266@mailbox.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
drivers/clk/spacemit/ccu_mix.c

index 9578366e97466e3383b0d917448b82d7e831092c..a8b407049bf4daa7f4eba2ed2f08d27bcd10fb2b 100644 (file)
@@ -73,7 +73,7 @@ static int ccu_mix_trigger_fc(struct clk_hw *hw)
        struct ccu_common *common = hw_to_ccu_common(hw);
        unsigned int val;
 
-       if (common->reg_fc)
+       if (!common->reg_fc)
                return 0;
 
        ccu_update(common, fc, common->mask_fc, common->mask_fc);