Skip to content

Commit

Permalink
cpufreq: imx6q: save one condition block for normal case of nvmem read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anson Huang authored and Rafael J. Wysocki committed Nov 29, 2018
1 parent 58ad4e6 commit cccf6ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/cpufreq/imx6q-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cccf6ae

Please sign in to comment.