Skip to content
Commit 54d7da77 authored by Igor Prusov's avatar Igor Prusov Committed by Sean Anderson
Browse files

clk: Check that composite clock's div has set_rate()



It's possible for composite clocks to have a divider that does not
implement set_rate() operation. For example, sandbox_clk_composite()
registers composite clock with a divider that only has get_rate().
Currently clk_composite_set_rate() only checks thate rate_ops are
present, so for sandbox it will cause NULL dereference during
clk_set_rate().

This patch adds rate_ops->set_rate check tp clk_composite_set_rate().

Signed-off-by: default avatarIgor Prusov <ivprusov@salutedevices.com>
Reviewed-by: default avatarSean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231205232334.2931-2-ivprusov@salutedevices.com
parent 3fb2d3d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment