[PATCH 4/4] clk: renesas: cpg-mssr: propagate return value of_genpd_add_provider_simple()

From: Lad Prabhakar
Date: Wed Nov 17 2021 - 06:51:28 EST


of_genpd_add_provider_simple() might fail, this patch makes sure we check
the return value of of_genpd_add_provider_simple() by propagating the
return value to the caller of cpg_mssr_add_clk_domain().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
---
drivers/clk/renesas/renesas-cpg-mssr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index f596a6438ac4..dde0693d2f3c 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -589,8 +589,7 @@ static int __init cpg_mssr_add_clk_domain(struct device *dev,

cpg_mssr_clk_domain = pd;

- of_genpd_add_provider_simple(np, genpd);
- return 0;
+ return of_genpd_add_provider_simple(np, genpd);
}

#ifdef CONFIG_RESET_CONTROLLER
--
2.17.1