mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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>
This commit is contained in:
parent
58ad4e6197
commit
cccf6ae52d
1 changed files with 3 additions and 2 deletions
|
@ -405,9 +405,10 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
|
||||||
if (of_machine_is_compatible("fsl,imx6ul") ||
|
if (of_machine_is_compatible("fsl,imx6ul") ||
|
||||||
of_machine_is_compatible("fsl,imx6ull")) {
|
of_machine_is_compatible("fsl,imx6ull")) {
|
||||||
ret = imx6ul_opp_check_speed_grading(cpu_dev);
|
ret = imx6ul_opp_check_speed_grading(cpu_dev);
|
||||||
if (ret == -EPROBE_DEFER)
|
|
||||||
return ret;
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
if (ret == -EPROBE_DEFER)
|
||||||
|
return ret;
|
||||||
|
|
||||||
dev_err(cpu_dev, "failed to read ocotp: %d\n",
|
dev_err(cpu_dev, "failed to read ocotp: %d\n",
|
||||||
ret);
|
ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue