From a067f7842c9371cd487fef6872380937db24d9e5 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Sat, 2 Apr 2022 14:37:39 +0200 Subject: [PATCH] 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 # imx8mp Tested-by: Marek Szyprowski # exynos4210, meson g12b Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1449,6 +1449,8 @@ static void clk_core_init_rate_req(struc 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);