]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 12 Feb 2025 20:01:35 +0000 (21:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:14 +0000 (14:40 +0200)
commit5e3ee618d6f1065deb173df8902bbe49bdaaf5ba
treecf378c5f98632fb2cd01a64743b6afddcb6068ba
parenta6e871c9125d8654105bb521c52b709f7ad5e77f
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate

[ Upstream commit 7a243e1b814a02ab40793026ef64223155d86395 ]

If regmap_read() fails, random stack value was used in calculating new
frequency in recalc_rate() callbacks.  Such failure is really not
expected as these are all MMIO reads, however code should be here
correct and bail out.  This also avoids possible warning on
uninitialized value.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250212-b4-clk-qcom-clean-v3-1-499f37444f5d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/clk-alpha-pll.c