mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
29 lines
946 B
Diff
29 lines
946 B
Diff
|
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
|
||
|
@@ -1439,6 +1439,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);
|
||
|
|