From: Anson Huang Date: Mon, 26 Nov 2018 02:59:48 +0000 (+0000) Subject: cpufreq: imx6q: save one condition block for normal case of nvmem read X-Git-Tag: v5.4-rc1~2006^2~3^3~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cccf6ae52d35f77fc8e8792d29b877024fdbe392;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 8cb9683..9fedf62 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;