Skip to content

Commit 12fd64b

Browse files
sremmind
authored andcommitted
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: a245fec ("clk: rockchip: add basic infrastructure for clock branches") Cc: [email protected] Signed-off-by: Sebastian Reichel <[email protected]> [added fixes + stable-cc] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 2e7b3da commit 12fd64b

File tree

1 file changed

+2
-1
lines changed
  • drivers/clk/rockchip

1 file changed

+2
-1
lines changed

drivers/clk/rockchip/clk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,13 @@ void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
450450
struct rockchip_clk_branch *list,
451451
unsigned int nr_clk)
452452
{
453-
struct clk *clk = NULL;
453+
struct clk *clk;
454454
unsigned int idx;
455455
unsigned long flags;
456456

457457
for (idx = 0; idx < nr_clk; idx++, list++) {
458458
flags = list->flags;
459+
clk = NULL;
459460

460461
/* catch simple muxes */
461462
switch (list->branch_type) {

0 commit comments

Comments
 (0)