Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754399AbaGCCLh (ORCPT ); Wed, 2 Jul 2014 22:11:37 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:41944 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754004AbaGCCLf (ORCPT ); Wed, 2 Jul 2014 22:11:35 -0400 MIME-Version: 1.0 In-Reply-To: <53B4A718.3050702@codeaurora.org> References: <53B4A718.3050702@codeaurora.org> Date: Thu, 3 Jul 2014 07:41:34 +0530 Message-ID: Subject: Re: [PATCH 09/14] cpufreq: cpu0: Move per-cluster initialization code to ->init() From: Viresh Kumar To: Stephen Boyd Cc: "Rafael J. Wysocki" , Shawn Guo , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Arvind Chauhan , linux-arm-msm@vger.kernel.org, Sachin Kamat , Thomas P Abraham , Nishanth Menon , Tomasz Figa Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3 July 2014 06:13, Stephen Boyd wrote: > drivers/cpufreq/cpufreq-generic.c:313:13: warning: 'cdev' may be used > uninitialized in this function [-Wmaybe-uninitialized] > > So I guess we should initialize it to NULL? I somehow didn't got this, I checked again. I have fixed it this way: diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index e6dc8ea..05a18bd 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -240,10 +240,11 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy) dev_err(cpu_dev, "running cpufreq without cooling device: %ld\n", PTR_ERR(cdev)); + else + priv->cdev = cdev; } of_node_put(np); - priv->cdev = cdev; priv->cpu_dev = cpu_dev; priv->cpu_reg = cpu_reg; policy->driver_data = priv; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/