summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/imx6q-cpufreq.c
diff options
context:
space:
mode:
authorAnson Huang <anson.huang@nxp.com>2018-11-26 05:59:48 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-11-30 00:37:22 +0300
commitcccf6ae52d35f77fc8e8792d29b877024fdbe392 (patch)
tree1e358279474c9cefc3202e1dadda3145f9825bbc /drivers/cpufreq/imx6q-cpufreq.c
parent58ad4e619747f6b2711396ad068af84185afb74d (diff)
downloadlinux-cccf6ae52d35f77fc8e8792d29b877024fdbe392.tar.xz
cpufreq: imx6q: save one condition block for normal case of nvmem read
Put return value checks of calling imx6ul_opp_check_speed_grading() into one block to save one condition block for normal case. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/imx6q-cpufreq.c')
-rw-r--r--drivers/cpufreq/imx6q-cpufreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 8cb9683f94d3..9fedf627e000 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -405,9 +405,10 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
if (of_machine_is_compatible("fsl,imx6ul") ||
of_machine_is_compatible("fsl,imx6ull")) {
ret = imx6ul_opp_check_speed_grading(cpu_dev);
- if (ret == -EPROBE_DEFER)
- return ret;
if (ret) {
+ if (ret == -EPROBE_DEFER)
+ return ret;
+
dev_err(cpu_dev, "failed to read ocotp: %d\n",
ret);
return ret;