aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorStephen Boyd <[email protected]>2020-01-03 16:19:21 -0800
committerDavid S. Miller <[email protected]>2020-01-05 15:09:58 -0800
commitd89091a4930ee0d80bee3e259a98513f3a2543ec (patch)
tree9bfe7fb8425ac590ded253de7221911d081d0b4e /tools/perf/util/scripting-engines/trace-event-python.c
parent15a821f050b243459ee84ca539b9c2af08da3c2c (diff)
macb: Don't unregister clks unconditionally
The only clk init function in this driver that register a clk is fu540_c000_clk_init(), and thus we need to unregister the clk when this driver is removed on that platform. Other init functions, for example macb_clk_init(), don't register clks and therefore we shouldn't unregister the clks when this driver is removed. Convert this registration path to devm so it gets auto-unregistered when this driver is removed and drop the clk_unregister() calls in driver remove (and error paths) so that we don't erroneously remove a clk from the system that isn't registered by this driver. Otherwise we get strange crashes with a use-after-free when the devm_clk_get() call in macb_clk_init() calls clk_put() on a clk pointer that has become invalid because it is freed in clk_unregister(). Cc: Nicolas Ferre <[email protected]> Cc: Yash Shah <[email protected]> Reported-by: Guenter Roeck <[email protected]> Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions