From patchwork Thu Dec 28 17:09:43 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: 10135127 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 6E27D60388 for ; Thu, 28 Dec 2017 17:10:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 519FE2D8EB for ; Thu, 28 Dec 2017 17:10:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 431FC2D8ED; Thu, 28 Dec 2017 17:10:14 +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 C74562D8DF for ; Thu, 28 Dec 2017 17:10:13 +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:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nY5yrITDezvdsghiMOVkS+0fZDOCRaSvP0zJnRv3d5o=; b=cMXcE68DzL9Maq OdJQ5XGGOo7SYUYydq91aUpY587uMz30K3f4UNi4i01Crg6n/o6QUikUtG+Bhewe8vLWVdL84L+gi zoywZDH3HVOSOZYC1vkIDdt6EqbuE4xZkQmDUsCWm+IEOtLM2PdIhTY7j7QI2QqgmZbRRrNRRJDtf rYN+c06kZyHC13fSAQNR310dib/CYs+BaHHD7mnBoYvKP4l3NGK3gw2UKN9Y3GVAzIY73W7Ejstzp PjLJZGl63FNcXK/AkWq9+j4QFvTv2w3AlEzbwYOuAHkMUite1ku3ygFruoA+76CCNF9qL/9yISM7z LmzPsuh9xs4WYUtGstgw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUbh4-0006xW-Iv; Thu, 28 Dec 2017 17:10:10 +0000 Received: from mout.web.de ([212.227.17.11]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eUbgv-0006Mf-NZ for linux-arm-kernel@lists.infradead.org; Thu, 28 Dec 2017 17:10:08 +0000 Received: from [192.168.1.3] ([77.182.224.146]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LmcjH-1f4DcZ2aCR-00aH5j; Thu, 28 Dec 2017 18:09:44 +0100 Subject: [PATCH 1/2] perf: arm_spe: Delete an error message for a failed memory allocation in arm_spe_pmu_device_dt_probe() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, Mark Rutland , Will Deacon References: <8a92bb8f-4295-6912-19a4-9103226a3c62@users.sourceforge.net> Message-ID: <09c83c44-aebb-f5cb-b398-1986bdbd52db@users.sourceforge.net> Date: Thu, 28 Dec 2017 18:09:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <8a92bb8f-4295-6912-19a4-9103226a3c62@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:9PAnD7PMgWKcZO5qotY/I5YKhNprNJxay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PmVqznozK9b08Ec6gVUoMSs58= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171228_091002_236489_B7291153 X-CRM114-Status: UNSURE ( 8.51 ) 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: Alexander Shishkin , 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: Thu, 28 Dec 2017 17:27:23 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/perf/arm_spe_pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 8ce262fc2561..27fac8907d1d 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -1166,9 +1166,7 @@ static int arm_spe_pmu_device_dt_probe(struct platform_device *pdev) spe_pmu = devm_kzalloc(dev, sizeof(*spe_pmu), GFP_KERNEL); - if (!spe_pmu) { - dev_err(dev, "failed to allocate spe_pmu\n"); + if (!spe_pmu) return -ENOMEM; - } spe_pmu->handle = alloc_percpu(typeof(*spe_pmu->handle)); if (!spe_pmu->handle)