Received: by 10.223.185.116 with SMTP id b49csp406514wrg; Fri, 16 Feb 2018 00:42:45 -0800 (PST) X-Google-Smtp-Source: AH8x2275eoRFrp/yZ+3H426s2SvizipsBApInXa0rrr1M38gzHbWZkJA+rSh6zuhjH1GeF6o4nXZ X-Received: by 10.98.0.67 with SMTP id 64mr1637874pfa.63.1518770565224; Fri, 16 Feb 2018 00:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518770565; cv=none; d=google.com; s=arc-20160816; b=HkRf9Sfz76rNkaL6dNZAxIxLa6RvE43SIw2H8u3IC+J1d6n34yNVDS8rXp1tMi5E7h BtdDVy3j2MQGlR8PeJWgpCmYSdvmjcIeYuKxnXuJQXOVf9uqWoR1FNRKvvNA+aWEPlnn fVi8xK+31s2zrRgQM4PNY67eH4byR3bEkAGniG5or0F8O56ACwu83vFo+JD7iemHY8zX Mj6tc4UujGLzVMuZPkVZ/gdvDOnzMdY+3yKKPn7PccDuzyhUYqMcjlFt1altvg19T/PF M4YDbB0EWwRPYoLO5fk83DbrbrfWFTQwzXEm0RNY3jBJWbweAebWx8vxySOv4qLqOCtD PYOg== 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:cc:subject :from:to:arc-authentication-results; bh=gPl5ZRi3oirUg3a256hTpk1/jOTo4xM1L7rLH/M90lA=; b=mt1w1PrPqRo5woV/SHC5uSBvmf4AVnI7wdZ8uGBcVqqp4W2Mp2BvFlkssjHVRwuD8P BBdwpFWiWx8F+AMubUIYUe55jdQE5Ka3cup0LO0H0tF9zGBariyvYbV12JnLAjQqgoBn U/y8le1V9NuwN0QXwjXBPhQXVCewbZMUCAYLZL7/GTqszWROETNaeq1v7yAsZCQXgg1y GhhgY3bqYexFdYZRM1w2BFQH6ms9RV/jaHA4Kih6vNhGoQx0fEowgQZJzcbbi9uaDdhe eFXhZ55N9VyKnyor1++bwzTVm5rf9UqQggydAIUq4wq7Rl18GmEzP7zeE8W2RvtZryJU YZkw== 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 e13-v6si2814387pln.750.2018.02.16.00.42.30; Fri, 16 Feb 2018 00:42:45 -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 S1426308AbeBOQk6 (ORCPT + 99 others); Thu, 15 Feb 2018 11:40:58 -0500 Received: from mout.web.de ([212.227.17.11]:47139 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423484AbeBOQkz (ORCPT ); Thu, 15 Feb 2018 11:40:55 -0500 Received: from [192.168.1.2] ([78.49.142.64]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MTPn1-1fBxlZ3kql-00SKye; Thu, 15 Feb 2018 17:40:15 +0100 To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Kukjin Kim , "Rafael J. Wysocki" , Viresh Kumar From: SF Markus Elfring Subject: [PATCH] cpufreq: s3c24xx: Delete an error message for a failed memory allocation in two functions Cc: LKML , kernel-janitors@vger.kernel.org Message-ID: <201722ce-019d-a5b4-fc00-74679d82b64f@users.sourceforge.net> Date: Thu, 15 Feb 2018 17:40:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:nohtQDWarD1ZUwY/h8OEhg1mWvVDMRyO1VTS+GAU56foLJZii4D vY/uHRXJkPYHbLO2Rtbn6ijBNdzM/8rZCm1a3vPzF1Ok+/PSxI8DEYSlKea/GnVG2pv+BxT ZxU2WU8GHBHj0EFz02Hcngk6XPBGmr5DuKRgSYKDl7XDtDYEmv6U4zU9Zrz00aytnlAHq+M 6XMlTOHUPEatgtkPqtTTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:uKRLPDQ8utg=:SfQbeG9zbK/jpF+6biEjzI aOlOmcwiHf8SzFXvt8/b0t//Xqbc+UqvF4pEv3eAXslHG7S0Fhd4HHD5ZEXZ6LWF+2vyL3GsJ 27xNf9eEXb7s+jplFWz8psLf2oBNnGqks/OFlFdJZIFhcSsv+t9B9eF4B/YSU0+ioF3vllmYN e2Mabis8nqDITFRtjGIsEDO6nk7EUVLkellZInjybjWmMOF+anj6NJVjjpRmQulx+YjNg0hfa hxSjeq7g5vxz3wkRx8nQWu131yj4TDsezZAo5aYiCXEpHeeThrQ5BlsqXDpbs+zpkul/JmxbI A0H92UJKCIA4/KkWqzovRriAiMF4bJxxAsm8DfgwWprdYLd6RA83St3naxFNJyRzS9s4Ebv1t 49vyGrLlA1rAQqnAYa4/JjdvfkU+kfKGxjyYQrhq6v+1P6jFYI//fHWqfezPP5QwCqPQoC0ok W5dyRKEoy3whQbK0W1lONJjuVkuwUEUj+hilQmpoRpQAs5ULo7DgyLdX2j/7GvU9qb1aAtxX0 OpNFgmm2/ynG2+f4FQFtprXtWf+T/rPXCwWLAUpq/+T8UjCyP8GRjuL9s7mFQVss9s1qjoVEs v5sx1YjHOUaiZY0IKwx/FMDaWehCctLhB3/YYC78BDPlKQSFu5s7/osgNQhUyHALj37nKUAkc 8X2yqcsfSqt/AYOxywVEUio9VnRglQg9CVGPdkIOHOtGpuqJ3COf0FB3GF0jmMneORsvzwMQR UsYB5v1XmlO7nOdZRRRrr8K0HjIzgGZjsHkzczxUoNbHoR+LcFkyVFmC6DcqlKXZEPG1r/O/O rplhx1UaGiG50tD71GhB5k1RnowE/10n9yBhWKl8r9c9TUGohA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 15 Feb 2018 17:28:40 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/cpufreq/s3c24xx-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 7b596fa38ad2..024afd0b9458 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c @@ -473,10 +473,8 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board) * initdata. */ ours = kzalloc(sizeof(*ours), GFP_KERNEL); - if (ours == NULL) { - pr_err("%s: no memory\n", __func__); + if (!ours) return -ENOMEM; - } *ours = *board; cpu_cur.board = ours; @@ -562,10 +560,8 @@ static int s3c_cpufreq_build_freq(void) size++; ftab = kzalloc(sizeof(*ftab) * size, GFP_KERNEL); - if (!ftab) { - pr_err("%s: no memory for tables\n", __func__); + if (!ftab) return -ENOMEM; - } ftab_size = size; -- 2.16.1