Skip to content

Commit

Permalink
cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anson Huang authored and Viresh Kumar committed Mar 17, 2020
1 parent 0c86862 commit 74a189e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/cpufreq/imx6q-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 74a189e

Please sign in to comment.