2022-05-16 21:40:32 +00:00
|
|
|
From a067f7842c9371cd487fef6872380937db24d9e5 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
|
|
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 <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>
|
|
|
|
---
|
|
|
|
drivers/clk/clk.c | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/clk/clk.c
|
|
|
|
+++ b/drivers/clk/clk.c
|
2024-04-28 19:35:55 +00:00
|
|
|
@@ -1542,6 +1542,8 @@ static void clk_core_init_rate_req(struc
|
2022-05-16 21:40:32 +00:00
|
|
|
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);
|
|
|
|
|