Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbdI0Tj4 (ORCPT ); Wed, 27 Sep 2017 15:39:56 -0400 Received: from mout.web.de ([212.227.17.11]:49546 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbdI0Tjy (ORCPT ); Wed, 27 Sep 2017 15:39:54 -0400 Subject: [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Linus Walleij , Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <66ff55fd-caae-9c98-197d-f6c3fe7a9c49@users.sourceforge.net> Message-ID: Date: Wed, 27 Sep 2017 21:39:48 +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: <66ff55fd-caae-9c98-197d-f6c3fe7a9c49@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ApGMjXI9xkgKv8YDcgUjstTR2JUk8pZCx27MNi7izS3Iu/lJ4wb nvPX5jErom85jaGuHNaXWGdprmDDaR/h/NQBEJ5HZZ6JrffE5adluy5BmPz102b7y7yIZcy PBOUFtiC49ptR7zXUM449P+cza//caLFTXWyNPVBIEF68tHFuDhprdBWdZrfBwqxPjaNzNf QnRup01VNWUXpPKsvEJXg== X-UI-Out-Filterresults: notjunk:1;V01:K0:c2B6ehUHImM=:jEfJyd9M3itn2uCJGhT5bM vMP96ISOX/xmSIDuH8rDfKPjXUrY57Lfb9eTVGo1/6SHf8kpxLwelac0cat0j3o/GnDPC5IHK 9MRLoWFAj/9efCOaXVkiFwXU0PNyESf0A9d3D6sqf920xizdnx6NwBcE4Rxp8hUsmLk2aOm2w hS3Klmetiqb4w/QaQMokWeVF8gmYRNgPbtXJ9kuE3rXLereFrEf9+6iA1q2TrfkxKGvFEcI9h Jys3mhj7wY9l8/fEVLYyyio+JVUXCB2zkz4y2lofEaO1mk0y6U8V1Pui52+cnezWFIcUexaJy DIKZyudKq3ma2elso9p7OLFZIRi9giJ/3Hc0vfsFrVxzHP6Np8oOuhXCAdpQLmWzgHX4TnpW/ oT5aJxSCUAhFJ+JYkc9UmhkWO7bUPoF/LcbjcuR14wWh6ddZBSldQjTyL8UfMU4u1Etvo4a/H 32TQgt5tY40ckyE2yWhJqPk1PD/4G8G6+u2b7DsDZtOLfe37Ms/iI8NYREm5kezzDTP6X2N77 WSKM2N54NcggBnWz4h9d1shn4RieUgQg0i9m+5MfqcdqRgTWghu4MfIFq8MZwTORvPqJNNnSC vEWOUaiue8lfoQLfESkzvcqCwvxSzJeIRIGfEKB1DEBH8IMCcREVT03qjN5g4Awq6qJqDqkmY wA5bfDlBz9GKQQhdnz8+RluCLgWyFfXmF0kdgqc12EKztLSD1wj9W4hmuP39a2ucMVM7C/cgO sPD8dNSy+6mRc3po/aY2O9FCjlM5rKI76Q+zLeXBG3oIrGCyUe2/WRoiomaL+zz2Og9xAz2C5 21kOQo4aWTN9Zc6WdqKXNuVxBWCiQ+Z8Y1Vkmh3Phd6PCIkvIA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1037 Lines: 35 From: Markus Elfring Date: Wed, 27 Sep 2017 21:21:23 +0200 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/clk/versatile/clk-icst.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 09fbe66f1f11..20ab4ceffb28 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -360,15 +360,12 @@ static struct clk *icst_clk_setup(struct device *dev, struct icst_params *pclone; icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL); - if (!icst) { - pr_err("could not allocate ICST clock!\n"); + if (!icst) return ERR_PTR(-ENOMEM); - } pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL); if (!pclone) { kfree(icst); - pr_err("could not clone ICST params\n"); return ERR_PTR(-ENOMEM); } -- 2.14.2