Skip to content
Commit 41b3588d authored by Tony Lindgren's avatar Tony Lindgren Committed by Stephen Boyd
Browse files

clk: ti: clkctrl: Fix returning uninitialized data



If we do a clk_get() for a clock that does not exists, we have
_ti_omap4_clkctrl_xlate() return uninitialized data if no match
is found. This can be seen in some cases with SLAB_DEBUG enabled:

Unable to handle kernel paging request at virtual address 5a5a5a5a
...
clk_hw_create_clk.part.33
sysc_notifier_call
notifier_call_chain
blocking_notifier_call_chain
device_add

Let's fix this by setting a found flag only when we find a match.

Reported-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Fixes: 88a17252

 ("clk: ti: add support for clkctrl clocks")
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 1cc54078
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment