mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
fbe2f7db86
All patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
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
|
|
@@ -1438,6 +1438,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);
|
|
|