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]>
This commit is contained in:
Maxime Ripard
2022-09-15 09:32:18 -07:00
committed by Stephen Boyd
parent 262ca38f4b
commit b46fd8dbe8
+2
View File
@@ -1447,6 +1447,8 @@ static void clk_core_init_rate_req(struct clk_core * const core,
if (WARN_ON(!core || !req))
return;
memset(req, 0, sizeof(*req));
req->rate = rate;
clk_core_get_boundaries(core, &req->min_rate, &req->max_rate);