From patchwork Tue Oct 3 08:40:05 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: 9981933 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 69C0360365 for ; Tue, 3 Oct 2017 08:40:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 577A028477 for ; Tue, 3 Oct 2017 08:40:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BE7328863; Tue, 3 Oct 2017 08:40:51 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1043628477 for ; Tue, 3 Oct 2017 08:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UfI+wo+AlppiM4Dt/u4pq5dJcgCdz1JDsnmKurMuUTU=; b=eew5PuczryEkKV /GcSvZv1wXJ7Tj0ucKnpXoOrAAIYds1UcPcRcqh2qIjsSwzLEMRs/vqYW9/cZRZ9PmKIxbffGXK58 IBGXuLGnJ/98G0xg3Eq4gxJ05YfSeNKlH4Whlt/NeVjyzcvQ8Y3TBurFHpgkJGBM8MfmNHdFGeuFB 5tb1SDphT2pxgUbiNi1cjziPl+n56/K9LJPnv60Hw4F3gmyUrjpWBVqorgY4NwCtqwCm+Y7LYYGih LxyfQtEbVhccGPwb5CqPnuPOcSLZtdIIjpJhZFRavaQSl/tZlrsFYiDc+kGtvQ8QRIT/Ns0B7puhJ qlnr5XtuCF3G391T7jZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzIku-00009K-6Q; Tue, 03 Oct 2017 08:40:44 +0000 Received: from mout.web.de ([212.227.15.4]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzIkq-0008Bs-Aa for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2017 08:40:42 +0000 Received: from [192.168.1.3] ([77.182.180.225]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M9Xfb-1eAbGy1WRj-00Cxjf; Tue, 03 Oct 2017 10:40:15 +0200 To: linux-arm-kernel@lists.infradead.org, Liviu Dudau , Lorenzo Pieralisi , Russell King , Sudeep Holla From: SF Markus Elfring Subject: [PATCH] ARM: vexpress/spc: Delete an error message for a failed memory allocation in two functions Message-ID: <557666e2-45b6-8f47-2fc9-756bd7f23541@users.sourceforge.net> Date: Tue, 3 Oct 2017 10:40:05 +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:I35kZCcR+P0L4nTXoRIuKadDGNg0pEgQFvmUZpZB3AldASqoFlQ OCGGDBmasi0rbUm0DWMMXHsfEq9W02e7Y+Ga9YxdY9VzuIsnW69c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BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171003_014040_706808_1E149034 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 3 Oct 2017 10:30:07 +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 Acked-by: Sudeep Holla --- arch/arm/mach-vexpress/spc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index fe488523694c..21c064267af5 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -451,10 +451,8 @@ int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid, int irq) { int ret; info = kzalloc(sizeof(*info), GFP_KERNEL); - if (!info) { - pr_err(SPCLOG "unable to allocate mem\n"); + if (!info) return -ENOMEM; - } info->baseaddr = baseaddr; info->a15_clusid = a15_clusid; @@ -535,10 +533,8 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev) struct clk_spc *spc; spc = kzalloc(sizeof(*spc), GFP_KERNEL); - if (!spc) { - pr_err("could not allocate spc clk\n"); + if (!spc) return ERR_PTR(-ENOMEM); - } spc->hw.init = &init; spc->cluster = topology_physical_package_id(cpu_dev->id);