From patchwork Tue Jun 7 02:05:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 855062 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p5725lY5020074 for ; Tue, 7 Jun 2011 02:05:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756880Ab1FGCFg (ORCPT ); Mon, 6 Jun 2011 22:05:36 -0400 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:37151 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754406Ab1FGCFf (ORCPT ); Mon, 6 Jun 2011 22:05:35 -0400 Received: from mail-gy0-f181.google.com ([209.85.160.181]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTe2Hb6qYHBX8OJzWREritzvKHkGCHqPd@postini.com; Mon, 06 Jun 2011 19:05:35 PDT Received: by mail-gy0-f181.google.com with SMTP id 4so2453015gyh.40 for ; Mon, 06 Jun 2011 19:05:34 -0700 (PDT) Received: by 10.236.195.2 with SMTP id o2mr6193301yhn.313.1307412334912; Mon, 06 Jun 2011 19:05:34 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id n29sm3634022yhj.82.2011.06.06.19.05.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2011 19:05:34 -0700 (PDT) From: Nishanth Menon To: linux-omap Cc: kevin , Nishanth Menon Subject: [pm-wip/cpufreq][PATCH 1/3] OMAP2+: cpufreq: minor flow beautification Date: Mon, 6 Jun 2011 21:05:28 -0500 Message-Id: <1307412330-25798-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1307412330-25798-1-git-send-email-nm@ti.com> References: <1307412330-25798-1-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 02:05:55 +0000 (UTC) Probably should be squashed to: "OMAP2+: cpufreq: fix freq_table leak" Looks like I've been lazy and added up a useless else case! Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/omap2plus-cpufreq.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c index 1406577..a962a31 100644 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c @@ -186,11 +186,11 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) } result = cpufreq_frequency_table_cpuinfo(policy, freq_table); - if (!result) - cpufreq_frequency_table_get_attr(freq_table, policy->cpu); - else + if (result) goto fail_table; + cpufreq_frequency_table_get_attr(freq_table, policy->cpu); + policy->min = policy->cpuinfo.min_freq; policy->max = policy->cpuinfo.max_freq; policy->cur = omap_getspeed(policy->cpu);