Re: [PATCH] clk: renesas: r9a06g032: Repair grave increment error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CC s/Phil/Gareth/

On Thu, Oct 27, 2022 at 6:31 PM Marek Vasut <marex@xxxxxxx> wrote:
> If condition (clkspec.np != pd->dev.of_node) is true, then the
> driver ends up in endless loop, forever, locking up the machine.
>
> Signed-off-by: Marek Vasut <marex@xxxxxxx>

Fixes: aad03a66f902e18b ("clk: renesas: r9a06g032: Add clock domain support")
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-clk-for-v6.2.

> --- 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;
> --
> 2.35.1

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux