aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/imx6q-cpufreq.c
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2020-03-17 12:38:54 +0800
committerViresh Kumar <viresh.kumar@linaro.org>2020-03-17 13:33:05 +0530
commit74a189ef079090f186e3abd6be295615cd9bf3b1 (patch)
tree38750f202eb0a9ef7d25ed1f0a31360375c1f0fd /drivers/cpufreq/imx6q-cpufreq.c
parentcpufreq: dt: Allow platform specific intermediate callbacks (diff)
downloadlinux-dev-74a189ef079090f186e3abd6be295615cd9bf3b1.tar.xz
linux-dev-74a189ef079090f186e3abd6be295615cd9bf3b1.zip
cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
Improve the -EPROBE_DEFER handling logic to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/imx6q-cpufreq.c')
-rw-r--r--drivers/cpufreq/imx6q-cpufreq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 285b8e9aa185..fdb2ffffbd15 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -400,11 +400,9 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
ret = imx6q_opp_check_speed_grading(cpu_dev);
}
if (ret) {
- if (ret == -EPROBE_DEFER)
- goto out_free_opp;
-
- dev_err(cpu_dev, "failed to read ocotp: %d\n",
- ret);
+ if (ret != -EPROBE_DEFER)
+ dev_err(cpu_dev, "failed to read ocotp: %d\n",
+ ret);
goto out_free_opp;
}