Received: by 10.223.148.5 with SMTP id 5csp7769539wrq; Thu, 18 Jan 2018 09:14:50 -0800 (PST) X-Google-Smtp-Source: ACJfBosN7byomlOC4K+5bG9lwpTNEqFvrh81xCPf5DnssOmblSTXMAACpXXLHuk6VAZhkXDL1HjZ X-Received: by 10.99.96.142 with SMTP id u136mr33505891pgb.406.1516295690854; Thu, 18 Jan 2018 09:14:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516295690; cv=none; d=google.com; s=arc-20160816; b=qYRllMGO8sWcOkrMyxTvadkySjPPE0P5qcnvexsZvLhuBSYCwPElsDCeck0F3joEsI PwH/cPn7ROBKIdlhNqZja3/Xzz3raj1qeq7j8U+HcCP+D8l3ZVBbNxqiyMXreDMhMVcs ygcHU37dJ/6wNLz5ckqoU4gTKZTZ+1vktNu/OZVM2pWGm6G/4RiE34i0PhnJELRIQTJe lAglBIJJ5+Gf/vpHzFiqmaBZWZ30gV/ptEw4Qz5TDtaf/RQUqqCnoHrS4XCh+Af+AAc7 wfwyILqXdFH+9E8NoXAjl9PiHmeV7eSSSs07/HpoIZ4LPi+KWLUQEI8S9QRPJp9wn3TI Q1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=+ChZsZq6NwxcCWP1Bix/MMoFSkXRtG4N6Zig7qRRDgs=; b=ogxHTOpXRactbG5RbfML5gFEth3V2r7fxm1bbK6WzXDusXbjoz/42ChkFcQDmZZ2a2 0SA+GPebQJIHvImQQkzpFZTK6V44gtpK0ujIdPyy4K4GGTAqHZqEwB5d+YAgbQAJ1Eul OvmTsdFFWGp9pNTX9KUOTYCDhObue/qF3/+7aVCHDXqyllF90J111DgIbGdh/JJDRc5i fCNnzIb1OErFamRym4OcMuXQEZgth2kV4iAzQ5L1qcDP5NQmj/W5EWb0YGWjIqaMWTRY yD5+TZGzi1VufwL+uAOO/sX3+IA2kVQKSoB7upMCHq1fN1E389/3rEtR6Rsi2yd2igXh gBJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10-v6si47799plz.107.2018.01.18.09.14.36; Thu, 18 Jan 2018 09:14:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444AbeARROG (ORCPT + 99 others); Thu, 18 Jan 2018 12:14:06 -0500 Received: from mout.web.de ([217.72.192.78]:60233 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754933AbeARROD (ORCPT ); Thu, 18 Jan 2018 12:14:03 -0500 Received: from [192.168.1.3] ([92.228.88.14]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MRCjL-1eFuzK3Wnf-00UdO2; Thu, 18 Jan 2018 18:13:49 +0100 To: kernel-janitors@vger.kernel.org, Jason Cooper , James Hogan , Marc Zyngier , Thomas Gleixner Cc: LKML From: SF Markus Elfring Subject: [PATCH] irq-imgpdc: Delete two error messages for a failed memory allocation in pdc_intc_probe() Message-ID: <09ce518e-44f9-2274-57a6-286bb75d5a5d@users.sourceforge.net> Date: Thu, 18 Jan 2018 18:13:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:lIMBuG5nQ0vUVU9JVkkN8c9Zvw0hnd8YjOVfGKRKTfiADBd83hx 60bcslxMqbtFU64vufK3bu8bQ2IK6in5Ac4U9M3i+Wug6GcpP9CeI4W97RGVa9uMbpDW2t7 osuLuQy1mwwf7uNek2xK9PIcsT4Pxpzn4CbOWA3fo3qT06FHgjVIRvN2R730NdRurmZbXy4 jRQpCNZ2f7O85cVH73l5Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:e9N16cPTVLw=:zcNjgiSLA5+fttSQGzuN86 S5BcodjJY8TbHqZJmMk5m9fU6feRxd15I0YcTitj6uvHXvo1ar8uC3wA00Z8bQHGb72r+/TvT L0CjbyprcZJnCO7FZSBaiV7SNBMV1xQQjzTH0gqg+NsnDAgzKy00WMBogFzI9rYW0cjkmtiQJ /6aa7WO6Dl7J6Q+P1rD7ir1/IsIJC/G2Wxo2tjRRcQrXNKScdKVnixWzQ4jFQFP+FQI0/a9/8 dbRfZqyORfR3Jrg9oKt94eiU4HUUMOScvTS7o4TsVqFY0tz7HEzlNDYN8IhobcyS8FYBvrPeI FD8O9EGrJWWPnaeuW3OQFkG/A8gNpRNXu6CvFobdxfneqD8mS5iyrzWnSMSSLDAzV6F9d+K3P NlYS5awyTOUy+NxDUFN7MKQ6IX3gHXL8oB6dYlV7EXF4KeoHdgJJ/v3c6ctKhA87adJXP8jmY VSQ6Rp5qcHLLrJ9CLo7gDayGwKIA/jIKk1xsYFjQ6DhdWsMRSSjWKdMPEAAsovSOl+A/R0Br0 txYYFmMtEhGzDRex0e2Ng0EwioymOLNH7I42j7EdHtlpAxu03MnMrbiQaPnw0OQZxbwCk0Pbt nEZMO1iP7uMf6bs+plJVyhztkFngzYSHYPYfrP+HAvScyujjV+kAsr8JKena4vvxXUp7NmrNp 9JNZ+spmThEfMikuuoYqOqs066FDWJ6AYqjvwQdKdOgJhjxw2IlHHeTGiRW8lAWSbbP2/tfi1 tV1duNOI9pPnJX6ap1sMV/1H/BW3iGSQwOStkC4lf12jp/WQPF8IMCQcc6zlepw62AWO0OzIb RtkTHqrLeuPnmeRxBaBtWpoUQxm36a+xdaNJsOlVoM40Jg1+WAIzWVJY9cswt/kQ4dulVGDIQ OJarBTX+ia39rYW1DOnLRB48NCH7rhOLT0+SCZxM/35PTZSbkYQIinCIKhn63w24L0qGj40ac Qia66Qln2W6/Xtwix4PyQUxHBoyhPgUYdwk/OvXlsWwlNyJNgmHMkU4wIcLs9T1KQDM9dHYx7 0w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 18 Jan 2018 18:05:46 +0100 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/irqchip/irq-imgpdc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c index e80263e16c4c..d4a2e9081fd2 100644 --- a/drivers/irqchip/irq-imgpdc.c +++ b/drivers/irqchip/irq-imgpdc.c @@ -316,10 +316,9 @@ static int pdc_intc_probe(struct platform_device *pdev) /* Allocate driver data */ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "cannot allocate device data\n"); + if (!priv) return -ENOMEM; - } + raw_spin_lock_init(&priv->lock); platform_set_drvdata(pdev, priv); @@ -356,10 +355,9 @@ static int pdc_intc_probe(struct platform_device *pdev) /* Get peripheral IRQ numbers */ priv->perip_irqs = devm_kzalloc(&pdev->dev, 4 * priv->nr_perips, GFP_KERNEL); - if (!priv->perip_irqs) { - dev_err(&pdev->dev, "cannot allocate perip IRQ list\n"); + if (!priv->perip_irqs) return -ENOMEM; - } + for (i = 0; i < priv->nr_perips; ++i) { irq = platform_get_irq(pdev, 1 + i); if (irq < 0) { -- 2.15.1