Skip to content
Commit e4818d61 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

clk: fixed-factor: Initialize clk_init_data on stack



This structure can be full of junk from the stack if we don't initialize
it. The clk framework tests clk_init_data::parent_names for non-NULL and
then considers that as the parent name pointer, but if it's full of junk
then we'll try to deref a bad pointer and oops the system. Let's
initialize the structure so that only clk_init_data::parent_names or
clk_init_data::parent_data is set, and not both.

Reported-by: default avatar"kernelci.org bot" <bot@kernelci.org>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Fixes: ecbf3f17 ("clk: fixed-factor: Let clk framework find parent")
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent ecbf3f17
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