From patchwork Wed Sep 27 17:22:47 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: 9974481 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 3A75E6037F for ; Wed, 27 Sep 2017 17:24:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2069229131 for ; Wed, 27 Sep 2017 17:24:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1525029248; Wed, 27 Sep 2017 17:24:17 +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=unavailable 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 40E7B292CD for ; Wed, 27 Sep 2017 17:24:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbdI0RXA (ORCPT ); Wed, 27 Sep 2017 13:23:00 -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 Received: from [192.168.1.3] ([92.228.186.72]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MJCSM-1duUt82q5K-002oVx; Wed, 27 Sep 2017 19:22:48 +0200 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-Language: en-GB 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;