Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969299AbdIZTl2 (ORCPT ); Tue, 26 Sep 2017 15:41:28 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1246 Lines: 42 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; -- 2.14.1