Skip to content

Commit cccf6ae

Browse files
Anson-Huangrafaeljw
authored andcommitted
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>
1 parent 58ad4e6 commit cccf6ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/cpufreq/imx6q-cpufreq.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,10 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
405405
if (of_machine_is_compatible("fsl,imx6ul") ||
406406
of_machine_is_compatible("fsl,imx6ull")) {
407407
ret = imx6ul_opp_check_speed_grading(cpu_dev);
408-
if (ret == -EPROBE_DEFER)
409-
return ret;
410408
if (ret) {
409+
if (ret == -EPROBE_DEFER)
410+
return ret;
411+
411412
dev_err(cpu_dev, "failed to read ocotp: %d\n",
412413
ret);
413414
return ret;

0 commit comments

Comments
 (0)