clk: renesas: cpg-mssr: Add number of clock cells check

The number of clock cells is not validated in the clock provider's
clk_src_get() callback.  Add the missing check.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/46e010659ffdffd5e3541369f3b65d43ebe236ec.1777562043.git.geert+renesas@glider.be
This commit is contained in:
Geert Uytterhoeven 2026-04-30 17:20:16 +02:00
parent 33cd08ac62
commit 7f0c422c7f

View File

@ -370,6 +370,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
struct clk *clk;
int range_check;
if (clkspec->args_count != 2)
return ERR_PTR(-EINVAL);
switch (clkspec->args[0]) {
case CPG_CORE:
type = "core";