diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-08-16 13:25:27 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-09-15 18:32:18 +0200 |
commit | b46fd8dbe8ad3fe6dcd44dcdf01a736c50d90a68 (patch) | |
tree | 524d93573e3e11989592d0eca997e2e034730793 /drivers | |
parent | clk: Stop forwarding clk_rate_requests to the parent (diff) | |
download | linux-b46fd8dbe8ad3fe6dcd44dcdf01a736c50d90a68.tar.xz linux-b46fd8dbe8ad3fe6dcd44dcdf01a736c50d90a68.zip |
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 <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-23-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/clk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 3f60eb836980..6b358448885b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -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); |