Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbdI0RXB (ORCPT ); Wed, 27 Sep 2017 13:23:01 -0400 Received: from mout.web.de ([212.227.17.12]:62291 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752000AbdI0RW5 (ORCPT ); Wed, 27 Sep 2017 13:22:57 -0400 To: linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, Michael Turquette , Stephen Boyd , Tero Kristo Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] clk/ti: Delete an error message for a failed memory allocation in two functions Message-ID: <120d01e4-5e58-e740-f6c7-c6835752aed3@users.sourceforge.net> Date: Wed, 27 Sep 2017 19:22:47 +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:MBb8u/iZ07zfaepB2UA/Cs6rH9azUO+uz0pWvYC8r78HKUnCsPp lmV/Nt/WLTBnRkNtwl0bWx5H1MBZjg+rvvGCezvnZrq82Zoqs/PGpSdmHRfGuBDkKHiLmKg ckuuQynxGPdtF+wCCt+KHQYFTqKutG71vV45tfx6YBOCWawXWbqhqzYOIxYoUFBg2BREu6D oYd93EWzCXKJiuDKGk0+w== X-UI-Out-Filterresults: notjunk:1;V01:K0:11Qjfz1wtTQ=:jhbx5QcTJR7CdcyTWAVHxh DzDtnGMbOfD2S7lzWe/0uriW4L38881Xef9p9MtIdrEJ87LJflRU/DvX24ZWpZU5UfVByrFXJ SoJZ7MlO1h9lN/IdNFmWdWwhoJ0gKjsoMj40IZDNX5tJazgM76CkjLOh5z8wuSLZVaPPAXzO6 WIRBisfEEt6Xeu+1VaRAR62/UldUwzuP7s2Tpn5aTMkqll9/flB2QH3RLYxZI9AZYje6HymJy 95ZX9v7e0KVss+oH082RsQkm8FyeaDVe7AcG3X0L8GXFOpsDXO4sbRDS1TBNhwryqbMSbkjgM B7uZKlhPLPs562hNhdavRhkDGJqkNS9QNxCGKXQpgsrQM7nKdJif9CAvgBMvZXNSMl6a8QU4g gWyUBkchF0DfmbkYs0MDB3Xatwqt2PFqZv8dCcL1g8Ip7QGVvdTjCSY+zNuQZdhi7PNB5dvva X7bkZM7mNrGqA28mMapx8E097RV+3dG2NFQQ94qNRtQDgjwFdc2UQRqLe0qeci5wmhKlVGrVq 8cXNNjhlHh3I+CPXA82Jm/x9VZUtCij8oENm6uA0UiIrEZ8ES+peAT2Zs4l+6ZbOZJDXimG3r xk9hbnothQVnXWGwpqEkY26niAwC0nZq1j6VJpELoLzi60+UUZXyx6HhT0yRrhK+QD7e5bk7q 9c9VZ3U8jhwt2fC4r3xQihGC6dGsdpiymmYXtuF6TjlO7RSkdADWziqAVR3Kpp9m4prvmE8iH vkgePlpnrVV8uNtKiwwVoZeGApf+w648Qp8O7+kPGk9bWuteRdPrdBfJuIUiGJbXoyJE9lO3V Wt8dKKzRHs3LBEKtvUh9mmau2BImIr+hCNpC01gHC4gI6Q5RqM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 47 From: Markus Elfring Date: Wed, 27 Sep 2017 19:14:01 +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/ti/divider.c | 4 +--- drivers/clk/ti/mux.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c index 88f04a4cb890..77f93f6d2806 100644 --- a/drivers/clk/ti/divider.c +++ b/drivers/clk/ti/divider.c @@ -292,10 +292,8 @@ static struct clk *_register_divider(struct device *dev, const char *name, /* allocate the divider */ div = kzalloc(sizeof(*div), GFP_KERNEL); - if (!div) { - pr_err("%s: could not allocate divider clk\n", __func__); + if (!div) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &ti_clk_divider_ops; diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c index 18c267b38461..d4705803f3d3 100644 --- a/drivers/clk/ti/mux.c +++ b/drivers/clk/ti/mux.c @@ -108,10 +108,8 @@ static struct clk *_register_mux(struct device *dev, const char *name, /* allocate the mux */ mux = kzalloc(sizeof(*mux), GFP_KERNEL); - if (!mux) { - pr_err("%s: could not allocate mux clk\n", __func__); + if (!mux) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &ti_clk_mux_ops; -- 2.14.2