mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 02:15:20 +02:00
clk: rockchip: fix error for unknown clocks
commit12fd64baba
upstream. 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:a245fecbb8
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eb4df5e36a
commit
bd588d5256
|
@ -433,12 +433,13 @@ void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
|
||||||
struct rockchip_clk_branch *list,
|
struct rockchip_clk_branch *list,
|
||||||
unsigned int nr_clk)
|
unsigned int nr_clk)
|
||||||
{
|
{
|
||||||
struct clk *clk = NULL;
|
struct clk *clk;
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
for (idx = 0; idx < nr_clk; idx++, list++) {
|
for (idx = 0; idx < nr_clk; idx++, list++) {
|
||||||
flags = list->flags;
|
flags = list->flags;
|
||||||
|
clk = NULL;
|
||||||
|
|
||||||
/* catch simple muxes */
|
/* catch simple muxes */
|
||||||
switch (list->branch_type) {
|
switch (list->branch_type) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user