From patchwork Mon Aug 22 08:38:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 9293223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2421B60574 for ; Mon, 22 Aug 2016 08:43:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1285828878 for ; Mon, 22 Aug 2016 08:43:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 039E428885; Mon, 22 Aug 2016 08:43:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A66828878 for ; Mon, 22 Aug 2016 08:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754467AbcHVInU (ORCPT ); Mon, 22 Aug 2016 04:43:20 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:51857 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754351AbcHVInS (ORCPT ); Mon, 22 Aug 2016 04:43:18 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.227]) by lucky1.263xmail.com (Postfix) with ESMTP id 6CBD150C; Mon, 22 Aug 2016 16:43:13 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 9FE9C3DC; Mon, 22 Aug 2016 16:43:12 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: ysato@users.sourceforge.jp X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <420c46552871180924d282beb453cb9b> X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 10202YYDEF9; Mon, 22 Aug 2016 16:43:13 +0800 (CST) From: Shawn Lin To: Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, Shawn Lin Subject: [PATCH] sh: clkfwk: remove unnecessary for failing to alloc mem Date: Mon, 22 Aug 2016 16:38:52 +0800 Message-Id: <1471855132-15448-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kzalloc will print err there, so we don't need this extra one. Signed-off-by: Shawn Lin --- drivers/sh/clk/cpg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;