Skip to content

Commit b46fd8d

Browse files
mripardbebarino
authored andcommitted
clk: Zero the clk_rate_request structure
In order to make sure we don't carry anything over from an already existing clk_rate_request pointer we would pass to clk_core_init_rate_req(), let's zero the entire structure before initializing it. Tested-by: Alexander Stein <[email protected]> # imx8mp Tested-by: Marek Szyprowski <[email protected]> # exynos4210, meson g12b Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Linux Kernel Functional Testing <[email protected]> Tested-by: Naresh Kamboju <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 262ca38 commit b46fd8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clk/clk.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,8 @@ static void clk_core_init_rate_req(struct clk_core * const core,
14471447
if (WARN_ON(!core || !req))
14481448
return;
14491449

1450+
memset(req, 0, sizeof(*req));
1451+
14501452
req->rate = rate;
14511453
clk_core_get_boundaries(core, &req->min_rate, &req->max_rate);
14521454

0 commit comments

Comments
 (0)