Received: by 10.223.185.116 with SMTP id b49csp460788wrg; Fri, 16 Feb 2018 01:49:05 -0800 (PST) X-Google-Smtp-Source: AH8x225nPiLAhWjw1a5BV04jG7sPjBEeutPTBjcC35LMyT9qBrg7F/JX/KA/n03zH68js0qN4Mrx X-Received: by 2002:a17:902:bc41:: with SMTP id t1-v6mr5413952plz.436.1518774544890; Fri, 16 Feb 2018 01:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518774544; cv=none; d=google.com; s=arc-20160816; b=YxHMKrtxc7NE0IOHDAf+DIF4NOFlWZVts4Q27/gx4IWLzVrjID0qbSia25/x4+DRJN eLAnCW2oQI8oenzMSk8zRuBdUFzRzcbN5FJQFObglfvnUAxjKJf4uEdoo3zneIH1Xh1H SmNdJpcfRGFSj4pilptk2JUwEsUUNnkJiHBqmh1GheYNgTs+p8+BS7zX4m/yeqE35xry LLLNzV+o1AajsRWB4SqHCkPkdb51n0uWAPE/Rwva/+Ti1CBTFqsJ319UtZIhIdK+rY8q OIarLRi/bBHtjkii8b+d0OCeLVYgbRkGP2y0gObgElYKvDe5uL4VB3gqCB96jg9Jf1rs Vn3A== 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=cuNjVcJoOn/tQZEoJxkdGM7y+wsP7OBw0zVONZfKSw4=; b=SOYimKJjLPkVMs5gCXOtLVWdZfqsGAdgi9pkULRb30Zpf+TmaSJ712qQlxN4W017Fz nm/iyLDX0eq6x/9J/CVxJYIDfN1r/08FhwfBtCglKuYLUqp99TOMGIZi3VwFlDWY7vY/ 4YKRmO8BEezLRnKH/20ESjXrXS5ENRUafoTUqpkYLhjxlnzz58VEydda8EuJZ+lHTnXV 6eMsFWtxIJE1QnKepHGOJl1x1ts2Veh/Y3pzi2O8iEfDqDCTkL8yQfnV0ehKFCsAUd4a um+KaCIBptSQZwRSAdFolaTPc4lZB+8+VmyFD5XA3znAS1lN2r+rIJk7+akpDWwAvKZ9 Ns7Q== 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 64-v6si4341430pld.465.2018.02.16.01.48.49; Fri, 16 Feb 2018 01:49:04 -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 S1427004AbeBORIl (ORCPT + 99 others); Thu, 15 Feb 2018 12:08:41 -0500 Received: from mout.web.de ([212.227.17.11]:51537 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422885AbeBORIh (ORCPT ); Thu, 15 Feb 2018 12:08:37 -0500 Received: from [192.168.1.2] ([78.49.142.64]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M2uao-1eU97E3RtW-00sfd9; Thu, 15 Feb 2018 18:08:34 +0100 To: linux-pm@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init() Message-ID: <650e783f-7b4c-17b5-3bc7-56e3058a95d1@users.sourceforge.net> Date: Thu, 15 Feb 2018 18:08:32 +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:nSmbYIxsy93Reb8GBjMMeZR2rn0uLVdwHouI6Wr6Jh+siJooXGT OV4xHYQ1r1xzeQXYr3LgJF9+b0Hx+Pqbjf2+wstGCUyv2pJM6dLCy5vX4lVlLArwKaUNZHq vEbz/ryea4P8nQGSu6cDanmQdl8JJdTYdvoK7E8bww5v0YnSQtbQBC5Qt+4P5aobfX9K+Xq P3not3vJBDQuGllY8NdRg== X-UI-Out-Filterresults: notjunk:1;V01:K0:GnJNVko7290=:IizO5hP8ASz8N31FSKjJmp KWXBTOaUoNE6WuMRIZKKF4kwAE1KqJhHh4VG3w3Z8kVC4qOurFSb7+tpLoiS7VEYsk/+tAzxg L59Y4pyXbm44+OaPxSTe8dbaWcy92MVth58tFaSnz3N41hnWP1fPJAuKdpCymQvP2uGOUN5GI y3KtI74+yBSj+4sqGJ9nKyVnfC7ru1CNeOo3zGdtoWChongBDh2OdrIUW/0x5HCKgQ/7mReUP 5eZD6sTXVXptcl4/2YnKsXFpZutFT91P1g/7SWY+h3UsSCg3gE9042OdH52jKGzVjmzQXcIZb CnoE5+okh7TBWBOMgb/xTcBATQ+kZCDcHWrS5v5tYwC0p1UWCOSJysmq6EKeo8PHUw7w5Oj8w 0+0yxl2PTjNKM8IzZKyPyekiKHpwxXRdFHRMk0a2GDW9C+4Gymd3A0kcdhyb9vR3ZwLFSleJ2 y2OG+iLNyh406Jmp+ZnV1To9GmVtSOcr6Cf1pJBkjCCuCrMb612aM+G2A/AyUrkr1pOr6uUwe 4XgFIG1SFgf0Rq5MHaUpIRQux9BI+0+31m/iZd5YqqZe70El1bWUsXEbfI9HjwlEUF4MhTcET hb3HJhaixnM+hUq3W29qcmivmw1o438vzNWg/wnB8qHLQBEuQHe3O+tAA6m2b8nJPSFbqrjqM IGAeUVSCzQhgCe8keVPsXtsQVMQIlvJuxaTGopzXVtfbzGPXtjYBy//3a1pMux0Y0tNoCV98V 2lX1J+r1Z80u4urWfUbipiV7KM6WUzhAiW2cSyJkRcksvrS+hrNTQ7oPeMFMZM3X6AiwZHrT7 whltTx8i1PpqsQbkOFWnZbtdXjx9B6qL2obOn6Z46yLNEMDBFE= 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 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; -- 2.16.1