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 <ralph.siemsen@linaro.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Gareth Williams <gareth.williams.jx@renesas.com>
Link: https://lore.kernel.org/r/20221028113834.7496-1-marex@denx.de
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
        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;
                        if (error)
                                return error;
                }
-               i++;
        }
 
        return 0;