]> www.infradead.org Git - users/willy/linux.git/commit
clk: rockchip: fix error for unknown clocks
authorSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 25 Mar 2024 19:33:36 +0000 (20:33 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 30 Aug 2024 14:59:24 +0000 (16:59 +0200)
commit12fd64babaca4dc09d072f63eda76ba44119816a
treef82974830c22dffaf696ab35c51f75626efc4cbe
parent2e7b3daa8cb1ebd17e6a7f417ef5e6553203035c
clk: rockchip: fix error for unknown clocks

There is a clk == NULL check after the switch to check for
unsupported clk types. Since clk is re-assigned in a loop,
this check is useless right now for anything but the first
round. Let's fix this up by assigning clk = NULL in the
loop before the switch statement.

Fixes: a245fecbb806 ("clk: rockchip: add basic infrastructure for clock branches")
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
[added fixes + stable-cc]
Link: https://lore.kernel.org/r/20240325193609.237182-6-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk.c