cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
Subsystems (2)
PATCH 1/1 cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
Improve the -EPROBE_DEFER handling logic to simplify the code.
Signed-off-by Anson Huang <[email protected]>
--- drivers/cpufreq/imx6q-cpufreq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/cpufreq/imx6q-cpufreq.c +3 -5
@@ -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; }
Signature · 1 line
2.7.4
Quoted 15 lines · Anson Huang
Improve the -EPROBE_DEFER handling logic to simplify the code.
Signed-off-by Anson Huang <[email protected]>--- drivers/cpufreq/imx6q-cpufreq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/cpufreq/imx6q-cpufreq.c +0
-0@@ -400,11 +400,9 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) ret =imx6q_opp_check_speed_grading (cpu_dev); }if (ret) {
drivers/cpufreq/imx6q-cpufreq.c static int imx6q_cpufreq_probe(struct platform_device *pdev) · line 407
Quoted 10 lines
drivers/cpufreq/imx6q-cpufreq.c +3
-5-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; }
Applied. Thanks.
Signature · 1 line
viresh