diff mbox

[09/14] cpufreq: cpu0: Move per-cluster initialization code to ->init()

Message ID CAKohpomqE5dw2OJMjQmWswHmKXsKmyw0LtjtQopd0ttOA6=hhQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Viresh Kumar July 3, 2014, 2:11 a.m. UTC
On 3 July 2014 06:13, Stephen Boyd <sboyd@codeaurora.org> 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:

        policy->driver_data = priv;
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox


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)
                                "running cpufreq without cooling device: %ld\n",
+               else
+                       priv->cdev = cdev;

-       priv->cdev = cdev;
        priv->cpu_dev = cpu_dev;
        priv->cpu_reg = cpu_reg;