mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
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);
|
|
|