linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
@ 2020-03-17  4:38 Anson Huang
  2020-03-17  8:03 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Anson Huang @ 2020-03-17  4:38 UTC (permalink / raw)
  To: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Improve the -EPROBE_DEFER handling logic to simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/cpufreq/imx6q-cpufreq.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 285b8e9..fdb2fff 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -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;
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
  2020-03-17  4:38 [PATCH] cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling Anson Huang
@ 2020-03-17  8:03 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2020-03-17  8:03 UTC (permalink / raw)
  To: Anson Huang
  Cc: rjw, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-arm-kernel, linux-kernel, Linux-imx

On 17-03-20, 12:38, Anson Huang wrote:
> Improve the -EPROBE_DEFER handling logic to simplify the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index 285b8e9..fdb2fff 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -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;
>  	}

Applied. Thanks.


-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-17  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17  4:38 [PATCH] cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling Anson Huang
2020-03-17  8:03 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).