mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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:
parent
33cd08ac62
commit
7f0c422c7f
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user