Skip to content

Commit 774560c

Browse files
mripardbebarino
authored andcommitted
clk: Initialize max_rate in struct clk_rate_request
Since commit b46fd8d ("clk: Zero the clk_rate_request structure"), the clk_core_init_rate_req() function clears the struct clk_rate_request passed as argument. However, the default value for max_rate isn't 0 but ULONG_MAX, and we end up creating a clk_rate_request instance where the maximum rate is 0. Let's initialize max_rate to ULONG_MAX properly. Fixes: b46fd8d ("clk: Zero the clk_rate_request structure") Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 2079d02 commit 774560c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/clk/clk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,7 @@ static void clk_core_init_rate_req(struct clk_core * const core,
14631463
return;
14641464

14651465
memset(req, 0, sizeof(*req));
1466+
req->max_rate = ULONG_MAX;
14661467

14671468
if (!core)
14681469
return;

0 commit comments

Comments
 (0)