]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cpufreq: cpufreq-cpu0: NULL is a valid regulator, part 2
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 26 Sep 2013 09:19:37 +0000 (11:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Sep 2013 18:08:59 +0000 (20:08 +0200)
Since the patch "cpufreq: cpufreq-cpu0: NULL is a valid regulator", cpu_reg
contains an error value if the regulator is not set, instead of NULL.
Accordingly, fix the remaining check for non-NULL cpu_reg.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-cpu0.c

index 78c49d8e0f4a91a0d1815ac485b3be457d04f117..c522a95c0e168ae30e4a347f189f89c27173c427 100644 (file)
@@ -229,7 +229,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
        if (of_property_read_u32(np, "clock-latency", &transition_latency))
                transition_latency = CPUFREQ_ETERNAL;
 
-       if (cpu_reg) {
+       if (!IS_ERR(cpu_reg)) {
                struct opp *opp;
                unsigned long min_uV, max_uV;
                int i;