Re: [PATCH] clk: spacemit: Fix empty PLL rate table handling

Yao Zi <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <am4ljYUAf_Abbjj-@pie>
On Sat, Aug 01, 2026 at 04:54:24PM +0800, Junhui Liu wrote:
> ccu_pll_lookup_best_rate() leaves best_entry uninitialized when the rate
> table is empty. Initialize it to NULL and have ccu_pll_set_rate() return
> -EINVAL when no matching entry is available.

Does a PLL with no rate entries make any sense? No operation in ccu_pll.c
seems valid with an empty rate table, not only ccu_pll_lookup_best_rate().
And all PLLs defined so far come with at least one entry in their tables.

> Fixes: 3aa2882a3e1a ("clk: spacemit: Add support for K1 SoC")
> Reported-by: Coverity Scan <[email protected]>

So this looks like a false positive.

> Signed-off-by: Junhui Liu <[email protected]>

Regards,
Yao Zi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.