clk: renesas: r9a06g032: Repair grave increment error
Subsystems (2)
PATCH v2 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: Gareth Williams <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Ralph Siemsen <[email protected]>
---
V2: - Drop Phil, add Gareth
- Add Fixes tag
- Add RB from Geert, Ralph
--- 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
PATCH v2 1/1 clk: renesas: r9a06g032: Repair grave increment error
Hi Marek,
Quoted 3 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.
Thanks for the patch, this looks correct to me.
Best Regards,
Gareth
Quoted 44 lines
Fixes aad03a66f902 ("clk: renesas: r9a06g032: Add clock domain support")Reviewed-by Geert Uytterhoeven <[email protected]>Reviewed-by Ralph Siemsen <[email protected]>Signed-off-by Marek Vasut <[email protected]>---
Cc: Gareth Williams <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Ralph Siemsen <[email protected]>
---
V2: - Drop Phil, add Gareth
- Add Fixes tag
- Add RB from Geert, Ralph--- drivers/clk/renesas/r9a06g032-clocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/clk/renesas/r9a06g032-clocks.c +1
-1@@ -412,7 +412,7 @@ static int r9a06g032_attach_dev(structgeneric_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)) {drivers/clk/renesas/r9a06g032-clocks.c +0
-1if (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