clk: renesas: rzg2l: Check return value of pm_genpd_init()
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 17 Nov 2021 11:50:58 +0000 (11:50 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 19 Nov 2021 10:37:03 +0000 (11:37 +0100)
commit27527a3d3b162e4512798c058c0e8a216c721187
tree343d82438260c985adef4de1b109f43a9d531ef7
parente7d960cd6afd56d8c6d4408b6b8a59c91baafcc2
clk: renesas: rzg2l: Check return value of pm_genpd_init()

Make sure we check the return value of pm_genpd_init() which might fail.
Also add a devres action to remove the power-domain in-case the probe
callback fails further down in the code flow.

Fixes: ef3c613ccd68a ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20211117115101.28281-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rzg2l-cpg.c