* [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions
@ 2019-05-27 12:34 Geert Uytterhoeven
2019-05-29 13:42 ` Simon Horman
2019-05-29 21:10 ` Niklas Söderlund
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-05-27 12:34 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-renesas-soc, linux-clk, Geert Uytterhoeven
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>
---
To be queued in clk-renesas-for-v5.3.
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 d1054204f3a75022..082d0bf12ea7f219 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -509,16 +509,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.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions
2019-05-27 12:34 [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions Geert Uytterhoeven
@ 2019-05-29 13:42 ` Simon Horman
2019-05-29 21:10 ` Niklas Söderlund
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2019-05-29 13:42 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michael Turquette, Stephen Boyd, linux-renesas-soc, linux-clk
On Mon, May 27, 2019 at 02:34:20PM +0200, Geert Uytterhoeven wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions
2019-05-27 12:34 [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions Geert Uytterhoeven
2019-05-29 13:42 ` Simon Horman
@ 2019-05-29 21:10 ` Niklas Söderlund
1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2019-05-29 21:10 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michael Turquette, Stephen Boyd, linux-renesas-soc, linux-clk
Hi Geert,
Thanks for your patch.
On 2019-05-27 14:34:20 +0200, Geert Uytterhoeven wrote:
> 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: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> To be queued in clk-renesas-for-v5.3.
>
> 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 d1054204f3a75022..082d0bf12ea7f219 100644
> --- a/drivers/clk/renesas/renesas-cpg-mssr.c
> +++ b/drivers/clk/renesas/renesas-cpg-mssr.c
> @@ -509,16 +509,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.17.1
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-29 21:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 12:34 [PATCH] clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions Geert Uytterhoeven
2019-05-29 13:42 ` Simon Horman
2019-05-29 21:10 ` Niklas Söderlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).