diff mbox

sh: clkfwk: remove unnecessary for failing to alloc mem

Message ID 1471855132-15448-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin Aug. 22, 2016, 8:38 a.m. UTC
kzalloc will print err there, so we don't need this extra one.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/sh/clk/cpg.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Sergei Shtylyov Aug. 22, 2016, 11:04 a.m. UTC | #1
Hello.

On 8/22/2016 11:38 AM, Shawn Lin wrote:

> kzalloc will print err there, so we don't need this extra one.

    s/err/error/?

> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
index 7442bc1..7b98937 100644
--- a/drivers/sh/clk/cpg.c
+++ b/drivers/sh/clk/cpg.c
@@ -250,10 +250,8 @@  static int __init sh_clk_div_register_ops(struct clk *clks, int nr,
 
 	freq_table_size *= (nr_divs + 1);
 	freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL);
-	if (!freq_table) {
-		pr_err("%s: unable to alloc memory\n", __func__);
+	if (!freq_table)
 		return -ENOMEM;
-	}
 
 	for (k = 0; !ret && (k < nr); k++) {
 		clkp = clks + k;