From: Philipp Zabel
Date: Thu, 26 Sep 2013 09:19:37 +0000 (+0200)
Subject: cpufreq: cpufreq-cpu0: NULL is a valid regulator, part 2
X-Git-Tag: firefly_0821_release~176^2~5192^2^2^2~1
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=43c638e3dd48ff1b1a93ea01c98e258e693880c3;p=firefly-linux-kernel-4.4.55.git
cpufreq: cpufreq-cpu0: NULL is a valid regulator, part 2
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
Signed-off-by: Rafael J. Wysocki
---
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 78c49d8e0f4a..c522a95c0e16 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -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;