diff options
author | Marek Vasut <[email protected]> | 2022-10-28 13:38:34 +0200 |
---|---|---|
committer | Geert Uytterhoeven <[email protected]> | 2022-11-01 10:15:28 +0100 |
commit | 02693e11611e082e3c4d8653e8af028e43d31164 (patch) | |
tree | 22b45abb8d55a85638a5e4aa3df06bb49286883e | |
parent | 3702cff6d9385565b1ea2670a5623f9695412019 (diff) |
clk: renesas: r9a06g032: Repair grave increment error
If condition (clkspec.np != pd->dev.of_node) is true, then the driver
ends up in an endless loop, forever, locking up the machine.
Fixes: aad03a66f902 ("clk: renesas: r9a06g032: Add clock domain support")
Reviewed-by: Ralph Siemsen <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Gareth Williams <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
-rw-r--r-- | drivers/clk/renesas/r9a06g032-clocks.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c index 1488c9d6e639..983faa5707b9 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -412,7 +412,7 @@ static int r9a06g032_attach_dev(struct generic_pm_domain *pd, int error; int index; - while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i, + while (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", i++, &clkspec)) { if (clkspec.np != pd->dev.of_node) continue; @@ -425,7 +425,6 @@ static int r9a06g032_attach_dev(struct generic_pm_domain *pd, if (error) return error; } - i++; } return 0; |