Received: by 10.223.185.116 with SMTP id b49csp3302460wrg; Sun, 18 Feb 2018 19:45:54 -0800 (PST) X-Google-Smtp-Source: AH8x227yiSJfP7CHhniELJ9HbTRqn7avBJTuJ9pvZmgdn1RmfSw+/nALwIPLsTGJl1n2E24KMEP7 X-Received: by 10.98.139.145 with SMTP id e17mr7421502pfl.53.1519011954794; Sun, 18 Feb 2018 19:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519011954; cv=none; d=google.com; s=arc-20160816; b=cOhmKkNnXDfpGOzHd9ZLDGuCiaP23HVL4FZtk9tq+jk4H60pE2+rxAgC+xP40Fu71W EWfrvVwbnZ5qY8sENPDOknmE0Mrene3fekal1+snvo9RYTzKjlfK+sX4fe+SY7DbjN2b yqsWnEWeb+mnN7+aiZNTn/YIk5+lCWUQujjH8nyVVFNHG31rmQ0FlvyVxaRXgsajguLh cmvB4lWY1U0j2j3Oxtlqifv4ltsKMEdHx8LzUmb9NaRxshvhuwNBt72lXLtY88mgbgbZ 25i9yVIFD8WupQbB6s483ewW448/51kdEEsdkYYn5xZjINBtZ7hwqVd+2AWY3fIRXYLI 4JKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=U32Yo1Z2yg75LXOEe2RgGB/gkoPd6g44NnkONaopdTI=; b=nM/NheZhW3V+zDXmaaTmBwHMRzuFObV9a5baDGteOTl1Ur1zcAcQn4FdegOWJtZieE oPY35Pb34sB2hZ5K0VmSoYXysyGFcdtexfo+qVz1dqQj2y1ZPs7lewN7AxtYhYzwkpFn v7dkaeg0IL9r6pA0faQj6QIQoscvDW8jiG8QvemzjvqjZzLeqxm6lGSFZVDap3d0sc9F ppK3FuPzsJpL9zSG+u5fqG/klyYVzYjSwZq5Z/f59KomXHjzhV6no6WTwTLi+l14sg2d Dbb9OW0ZIWXzRQDpGsKRvDd65sFu5ki984s5GQbAWThJH3ON1afeD1aDUJrTpn7spsT5 rdtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=csncvJOz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w124si5467554pfw.55.2018.02.18.19.45.40; Sun, 18 Feb 2018 19:45:54 -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; dkim=pass header.i=@linaro.org header.s=google header.b=csncvJOz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbeBSDos (ORCPT + 99 others); Sun, 18 Feb 2018 22:44:48 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:41116 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbeBSDoq (ORCPT ); Sun, 18 Feb 2018 22:44:46 -0500 Received: by mail-pl0-f67.google.com with SMTP id k8so4979902pli.8 for ; Sun, 18 Feb 2018 19:44:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U32Yo1Z2yg75LXOEe2RgGB/gkoPd6g44NnkONaopdTI=; b=csncvJOzlMjwi2ASEZoDLYUBRirkbsEl9E3p2S2LxSlsDa7FiggWnGm70NS3UBD3py 1WdoXzX2qz3OQTQOkTpHapQUa0ji1ixStW6UC8gk/jnVn5glilM9g7BmETz9FQtkXTDK Dj/nk7kevjdqON7kSLItGF1CUAlzQs9vWq454= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=U32Yo1Z2yg75LXOEe2RgGB/gkoPd6g44NnkONaopdTI=; b=XkjPkCL8i3HuHp4eh9/p7D/tuVRtlatni8n6dQ71xg/wZylGPUJQ4hvRDK7gWM2hOZ s42XVDwe9Ppv5cT4jFouT4Ao5/eGjo254pCh3z55+200fBX/cEi+gpXCwTy97FDREX8l I4rq/k6Oe+pcN2QF5PbB3sqtxsFDVG/DYMBdvndFDXZqqnPmWmqNuXGXZn4rxuohy5WC Leq6JVV/jBO1bu52ivl9JeaEDkBarE7F5LECxiU9Q6jm6IAo9YP4bT5n5+AHaulJi83y Y1GQJjH8HABPtbP0FH0wQIjIfh9pmMsZE07njSzCPCrrmn0e4q8RJ1M8REF2gGufwVwh r1AA== X-Gm-Message-State: APf1xPC0pQ+alpjcmZmguydxz+Z9PT55bXXdf/yijXcuryXExvu/y8Qg cJvyVUD7J94w4oV1+NWakOQGxIGzOC0= X-Received: by 2002:a17:902:7787:: with SMTP id o7-v6mr12847998pll.395.1519011885566; Sun, 18 Feb 2018 19:44:45 -0800 (PST) Received: from localhost ([122.167.232.138]) by smtp.gmail.com with ESMTPSA id u186sm365487pfu.145.2018.02.18.19.44.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Feb 2018 19:44:45 -0800 (PST) Date: Mon, 19 Feb 2018 09:14:43 +0530 From: Viresh Kumar To: SF Markus Elfring Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init() Message-ID: <20180219034443.GL28462@vireshk-i7> References: <650e783f-7b4c-17b5-3bc7-56e3058a95d1@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <650e783f-7b4c-17b5-3bc7-56e3058a95d1@users.sourceforge.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-02-18, 18:08, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 15 Feb 2018 18:00:37 +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/cpufreq/qoriq-cpufreq.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c > index 0562761a3dec..ee3e3656485b 100644 > --- a/drivers/cpufreq/qoriq-cpufreq.c > +++ b/drivers/cpufreq/qoriq-cpufreq.c > @@ -192,16 +192,12 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) > count = clk_hw_get_num_parents(hwclk); > > data->pclk = kcalloc(count, sizeof(struct clk *), GFP_KERNEL); > - if (!data->pclk) { > - pr_err("%s: no memory\n", __func__); > + if (!data->pclk) > goto err_nomem2; > - } > > table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL); > - if (!table) { > - pr_err("%s: no memory\n", __func__); > + if (!table) > goto err_pclk; > - } > > for (i = 0; i < count; i++) { > clk = clk_hw_get_parent_by_index(hwclk, i)->clk; Acked-by: Viresh Kumar -- viresh