Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752077AbdI0QxY (ORCPT ); Wed, 27 Sep 2017 12:53:24 -0400 Received: from mout.web.de ([217.72.192.78]:58634 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdI0QxW (ORCPT ); Wed, 27 Sep 2017 12:53:22 -0400 To: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, Jonathan Hunter , Michael Turquette , Peter De Schrijver , Prashant Gaikwad , Stephen Boyd , Thierry Reding From: SF Markus Elfring Subject: [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions Cc: LKML , kernel-janitors@vger.kernel.org Message-ID: <9cc51853-c393-91e6-45d8-6516dde90366@users.sourceforge.net> Date: Wed, 27 Sep 2017 18:53:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:+lDm2i6H6IH/+ycZZ6Z9PF0KNLQVEQik+cKdoeSUF05/FATbG+E pBIXDrk/C0T0WSGh+heuSDcwxAmb1myukSChfhFsxWHy1vpRVRVSAN+SVc1svBy6+vgQ2AW CmgG1/lkDwraphuf13evuIto93gR4nn3dm1agSWCJtOxSsTPvKTqW7EakA859xrfuTNqcSw v/uhvEU18GMWbirUAVwBw== X-UI-Out-Filterresults: notjunk:1;V01:K0:jJxr01pBct4=:fAO1EFSvlgP13nPD6sQWiQ f1Nw1z0SXUVeWfisPJc1Huh74EqzijKXUsWmqze4FNkt01JtRsLvXOK+V55Ba8IAzs8NcjtHB XOVJt/QrZNJqymASSOG92UBzoa+HeGHdcarmydKVBRax/DS01yHXzC2rhyh6EUs1jbxJBt3TF 5NzvAexqDu8iJFTBaueN86UpxokZLlx+YWM4AZ/Oka38jhddcaZyCq25cf0MPfOLQm3cLN2fT E8sdsXyv+fmO6k+VTFnXoHhyhH7SPa0HRF3aFtHHfoE6fcAMhOiXQnW+GNZbZ5rmnkThSot5b uARLvf/a9j+qBRwTImArDj6Mw0frXZ3n2IgFVhYkmEFbpgEDxvaxTuaHYBXIz58Ha+bp9XxSI bYwtsv64pzyvhZ07bt8M/MKa9gpxcqcVopCGN6Nm1VynXMOWtgDFZf5BzCMxd4TwvYuPLqJzS dKAkzlEjE5rqRHTuphM4npDC2/MqiUHE7/+isicwhy++swZSBtnsw7lpmvpDYfnVWoXV23BDL A/AMxjU4Z39ai0GgMh/l5mHv7hflTjBQ+j3i4Ua/YF4kuBlaaVpq51dIaDsLgBlDoQl/oDQv8 +Wiu3ziMZs0w9arffbGGOnP9KPhvFoVDGcg86fWniP3O80mBVIoX8mf9DswTLRi//J274QnPW S7CJDW7p/RbLVhKmF9/72vURiIU3Xc+zmsMf1CoTfQVDwAXw5o+MyczD0bBYxUn85XaXOdVeV tg5sdsnmUCMshucDthjaHfeFzMo8xXlFnij5Yt7/uwbWRAKwqEB7ahORGBf/OfTBzdc9o92Tn z8VcHB7VXPRAF4OvWwNLKzmh+LUpB2woi2KAg7nkxqfEczxuPg= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2122 Lines: 65 From: Markus Elfring 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 --- 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