[cip-dev] [PATCH 4.19.y-cip v2 15/57] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions

Fabrizio Castro
2019-08-28T13:32:02Z

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit ed04e6288ac59a59a2e9265194a6be892f708c66 upstream.

pm_clk_create() and pm_clk_add_clk() can fail only when running out of
memory. Hence there is no need to print error messages on failure, as
the memory allocation core already takes care of that.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Niklas S?derlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
drivers/clk/renesas/renesas-cpg-mssr.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 3fe648a..d9541e1 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -473,16 +473,12 @@ int cpg_mssr_attach_dev(struct generic_pm_domain *unused, struct device *dev)
return PTR_ERR(clk);

error = pm_clk_create(dev);
- if (error) {
- dev_err(dev, "pm_clk_create failed %d\n", error);
+ if (error)
goto fail_put;
- }

error = pm_clk_add_clk(dev, clk);
- if (error) {
- dev_err(dev, "pm_clk_add_clk %pC failed %d\n", clk, error);
+ if (error)
goto fail_destroy;
- }

return 0;

--
2.7.4