lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cc51853-c393-91e6-45d8-6516dde90366@users.sourceforge.net>
Date:   Wed, 27 Sep 2017 18:53:10 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-clk@...r.kernel.org, linux-tegra@...r.kernel.org,
        Jonathan Hunter <jonathanh@...dia.com>,
        Michael Turquette <mturquette@...libre.com>,
        Peter De Schrijver <pdeschrijver@...dia.com>,
        Prashant Gaikwad <pgaikwad@...dia.com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Thierry Reding <thierry.reding@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] clk/tegra: Delete an error message for a failed memory
 allocation in three functions

From: Markus Elfring <elfring@...rs.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@...rs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ