clk: renesas: r9a06g032: Repair grave increment error
Subsystems (2)
PATCH 1/1 clk: renesas: r9a06g032: Repair grave increment error
If condition (clkspec.np != pd->dev.of_node) is true, then the driver ends up in endless loop, forever, locking up the machine.
---
Cc: Geert Uytterhoeven <[email protected]>
Cc: Phil Edworthy <[email protected]>
Cc: Ralph Siemsen <[email protected]>
--- drivers/clk/renesas/r9a06g032-clocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/renesas/r9a06g032-clocks.c +1 -2
@@ -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 ;
Signature · 1 line
2.35.1
Quoted 11 lines · Marek Vasut
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 <[email protected]>---
Cc: Geert Uytterhoeven <[email protected]>
Cc: Phil Edworthy <[email protected]>
Cc: Ralph Siemsen <[email protected]>
---drivers/clk/renesas/r9a06g032-clocks.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)
That's a nice one!
Regards,
-Ralph
CC s/Phil/Gareth/
Quoted 4 lines · Marek Vasut
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 <[email protected]>
i.e. will queue in renesas-clk-for-v6.2.
Quoted 20 lines
drivers/clk/renesas/r9a06g032-clocks.c +1
-3@@ -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 ; --
Quoted 1 line
2.35.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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