linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions
@ 2017-09-27 16:53 SF Markus Elfring
  2017-09-29  9:19 ` Peter De Schrijver
  2017-11-02  8:19 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-09-27 16:53 UTC (permalink / raw)
  To: linux-clk, linux-tegra, Jonathan Hunter, Michael Turquette,
	Peter De Schrijver, Prashant Gaikwad, Stephen Boyd,
	Thierry Reding
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 18:40:34 +0200

Omit extra messages for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/tegra/clk-audio-sync.c  | 4 +---
 drivers/clk/tegra/clk-divider.c     | 5 +----
 drivers/clk/tegra/clk-periph-gate.c | 4 +---
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c
index 92d04ce2dee6..62a84c883dd4 100644
--- a/drivers/clk/tegra/clk-audio-sync.c
+++ b/drivers/clk/tegra/clk-audio-sync.c
@@ -62,10 +62,8 @@ struct clk *tegra_clk_register_sync_source(const char *name,
 	struct clk *clk;
 
 	sync = kzalloc(sizeof(*sync), GFP_KERNEL);
-	if (!sync) {
-		pr_err("%s: could not allocate sync source clk\n", __func__);
+	if (!sync)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	sync->rate = rate;
 	sync->max_rate = max_rate;
diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 16e0aee14773..5ee9423ccac2 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -156,11 +156,8 @@ struct clk *tegra_clk_register_divider(const char *name,
 	struct clk_init_data init;
 
 	divider = kzalloc(sizeof(*divider), GFP_KERNEL);
-	if (!divider) {
-		pr_err("%s: could not allocate fractional divider clk\n",
-		       __func__);
+	if (!divider)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	init.name = name;
 	init.ops = &tegra_clk_frac_div_ops;
diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c
index 303ef32ee3f1..276cc4c59204 100644
--- a/drivers/clk/tegra/clk-periph-gate.c
+++ b/drivers/clk/tegra/clk-periph-gate.c
@@ -141,10 +141,8 @@ struct clk *tegra_clk_register_periph_gate(const char *name,
 		return ERR_PTR(-EINVAL);
 
 	gate = kzalloc(sizeof(*gate), GFP_KERNEL);
-	if (!gate) {
-		pr_err("%s: could not allocate periph gate clk\n", __func__);
+	if (!gate)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	init.name = name;
 	init.flags = flags;
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions
  2017-09-27 16:53 [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
@ 2017-09-29  9:19 ` Peter De Schrijver
  2017-11-02  8:19 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Peter De Schrijver @ 2017-09-29  9:19 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-clk, linux-tegra, Jonathan Hunter, Michael Turquette,
	Prashant Gaikwad, Stephen Boyd, Thierry Reding, LKML,
	kernel-janitors


Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>

On Wed, Sep 27, 2017 at 06:53:10PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 18:40:34 +0200
> 
> Omit extra messages for a memory allocation failure in these functions.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/clk/tegra/clk-audio-sync.c  | 4 +---
>  drivers/clk/tegra/clk-divider.c     | 5 +----
>  drivers/clk/tegra/clk-periph-gate.c | 4 +---
>  3 files changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c
> index 92d04ce2dee6..62a84c883dd4 100644
> --- a/drivers/clk/tegra/clk-audio-sync.c
> +++ b/drivers/clk/tegra/clk-audio-sync.c
> @@ -62,10 +62,8 @@ struct clk *tegra_clk_register_sync_source(const char *name,
>  	struct clk *clk;
>  
>  	sync = kzalloc(sizeof(*sync), GFP_KERNEL);
> -	if (!sync) {
> -		pr_err("%s: could not allocate sync source clk\n", __func__);
> +	if (!sync)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	sync->rate = rate;
>  	sync->max_rate = max_rate;
> diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
> index 16e0aee14773..5ee9423ccac2 100644
> --- a/drivers/clk/tegra/clk-divider.c
> +++ b/drivers/clk/tegra/clk-divider.c
> @@ -156,11 +156,8 @@ struct clk *tegra_clk_register_divider(const char *name,
>  	struct clk_init_data init;
>  
>  	divider = kzalloc(sizeof(*divider), GFP_KERNEL);
> -	if (!divider) {
> -		pr_err("%s: could not allocate fractional divider clk\n",
> -		       __func__);
> +	if (!divider)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	init.name = name;
>  	init.ops = &tegra_clk_frac_div_ops;
> diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c
> index 303ef32ee3f1..276cc4c59204 100644
> --- a/drivers/clk/tegra/clk-periph-gate.c
> +++ b/drivers/clk/tegra/clk-periph-gate.c
> @@ -141,10 +141,8 @@ struct clk *tegra_clk_register_periph_gate(const char *name,
>  		return ERR_PTR(-EINVAL);
>  
>  	gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> -	if (!gate) {
> -		pr_err("%s: could not allocate periph gate clk\n", __func__);
> +	if (!gate)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	init.name = name;
>  	init.flags = flags;
> -- 
> 2.14.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-clk" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions
  2017-09-27 16:53 [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
  2017-09-29  9:19 ` Peter De Schrijver
@ 2017-11-02  8:19 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2017-11-02  8:19 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-clk, linux-tegra, Jonathan Hunter, Michael Turquette,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding, LKML,
	kernel-janitors

On 09/27, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 18:40:34 +0200
> 
> Omit extra messages for a memory allocation failure in these functions.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-02  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 16:53 [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
2017-09-29  9:19 ` Peter De Schrijver
2017-11-02  8:19 ` Stephen Boyd

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).