From patchwork Tue Sep 26 19:41:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9972605 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 B86756037E for ; Tue, 26 Sep 2017 19:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A987628F44 for ; Tue, 26 Sep 2017 19:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E6BD28F90; Tue, 26 Sep 2017 19:41:28 +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 1CCF228F44 for ; Tue, 26 Sep 2017 19:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968568AbdIZTl1 (ORCPT ); Tue, 26 Sep 2017 15:41:27 -0400 Received: from mout.web.de ([212.227.17.11]:53985 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966069AbdIZTl0 (ORCPT ); Tue, 26 Sep 2017 15:41:26 -0400 Received: from [192.168.1.3] ([78.49.148.35]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MfqAq-1dkud22uV2-00NCaI; Tue, 26 Sep 2017 21:41:20 +0200 Subject: [PATCH 1/2] clk-xgene: Delete an error message for a failed memory allocation in two functions From: SF Markus Elfring To: linux-clk@vger.kernel.org, Loc Ho , Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <1440d17a-ae7d-0a9c-49b4-611824df5e87@users.sourceforge.net> Message-ID: <2a6fb281-932f-e043-f084-355a3020411a@users.sourceforge.net> Date: Tue, 26 Sep 2017 21:41:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1440d17a-ae7d-0a9c-49b4-611824df5e87@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:53GHVnXDRYYjiFPbUu667BekiwXuECDHIAe4TxTr/cus5koxmf6 tnieldW8O1lqKy0iRiOITbEBCc9+DB9G3PIwr2MFAfjbuErM3ES7rVex9KexSIIHZM4KErw SzN+wJ1HZiud6x9M4PhDa6cakjvnlc3lnmzCSNJeWPdL/cDt2vmzWstOu/QAAEB7cIBOHW8 Et9lLzw0cVN+U8IodnDkA== X-UI-Out-Filterresults: notjunk:1; V01:K0:dMS4J8ZALM8=:NCmx+nuAT7ufFhR+6XxdGo MG3jIgKbs0zaWd1thqNDMgc1g4eSGa6jXP+MmgVcd42as1cl/RIrogp58FRf3V7ob3r2dBs9Y xEbObIHTx79n3Q7F2FrTtJAdjlXm3G4Oq8PniTYqE4uziLD651NxFh+DFGivcNGHMoALE/hM6 K4PFE0tMLo61GfdS98RE4YO5hWWSGlbS7XH8kgBNW5mCWjrhOcNXIuimQf2N9fFSYLTD5tpF4 LgSG23rKftNNFPLYQMCRpJOza2rFolraGtQpBHRhVwtrzoPT+Q7VMUdJp7kAza8Dmt7VNaz7b 8N0z7kA05eKSyK2g64BjJROyQXKCDcTTX15Sp5vtwggepsmCWykb+RTiJfy1tedrcHKG7insD pbq7BV4oPlsTdOawkXK0BBCWLIVLenJHe/ERvRRYHm9pWUj250ohT4icRQkrhrQe4xWdZUjo+ 7CaFuem+slby6M6LvNfWN5MRpQPGcoqwdq7Kshi3tM2XVkD7pKszVRwpPKalqb1hFLUGWpjUT 7sUHem7qwAsmDM+UCxx42FzWVBulyn3vvLE7tNqGy5BXnZHd4oe9+fdHT/k2bM194Z5Id4uzG iKNUirdqww0JSNi4RV2qSpxkCe2bnGjuFLl02G0npQG3dNqv3eKGXWYbfQilOQdjHeYXjFlHZ hEMUkohdayKs88PHRxWeZh7XACFnTexJzPIhFtONbgRcM+8LJZvat3HxGg8t3WDZ/027xKC/4 qh7ofFSaNJejGIeD1+lryHRATte9XBAuXbdEkncrlCk6rMLluMf8ywEVUVdKxho91inqu59XC qtl9JUDslIof5q+KT7aVL3eSdS+macI70StYoasgssrt/nSww8= Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 26 Sep 2017 21:19:19 +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 --- drivers/clk/clk-xgene.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index 4c75821a3933..3cc84a65f686 100644 --- a/drivers/clk/clk-xgene.c +++ b/drivers/clk/clk-xgene.c @@ -146,10 +146,8 @@ static struct clk *xgene_register_clk_pll(struct device *dev, /* allocate the APM clock structure */ apmclk = kzalloc(sizeof(*apmclk), GFP_KERNEL); - if (!apmclk) { - pr_err("%s: could not allocate APM clk\n", __func__); + if (!apmclk) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &xgene_clk_pll_ops; @@ -650,10 +648,8 @@ static struct clk *xgene_register_clk(struct device *dev, /* allocate the APM clock structure */ apmclk = kzalloc(sizeof(*apmclk), GFP_KERNEL); - if (!apmclk) { - pr_err("%s: could not allocate APM clk\n", __func__); + if (!apmclk) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &xgene_clk_ops;