diff mbox series

cpufreq: scmi: Fix an error message

Message ID b0c09698216af60d97bfd30b55bad89dc0f70112.1620328067.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Delegated to: viresh kumar
Headers show
Series cpufreq: scmi: Fix an error message | expand

Commit Message

Christophe JAILLET May 6, 2021, 7:09 p.m. UTC
'ret' is known to be 0 here.
The last error code is stored in 'nr_opp', so use it in the error message.

Fixes: 71a37cd6a59d ("scmi-cpufreq: Remove deferred probe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/cpufreq/scmi-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sudeep Holla May 7, 2021, 8:59 a.m. UTC | #1
On Thu, May 06, 2021 at 09:09:48PM +0200, Christophe JAILLET wrote:
> 'ret' is known to be 0 here.
> The last error code is stored in 'nr_opp', so use it in the error message.
>

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep
Viresh Kumar May 20, 2021, 3:59 a.m. UTC | #2
On 06-05-21, 21:09, Christophe JAILLET wrote:
> 'ret' is known to be 0 here.
> The last error code is stored in 'nr_opp', so use it in the error message.
> 
> Fixes: 71a37cd6a59d ("scmi-cpufreq: Remove deferred probe")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/cpufreq/scmi-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
> index c8a4364ad3c2..ec9a87ca2dbb 100644
> --- a/drivers/cpufreq/scmi-cpufreq.c
> +++ b/drivers/cpufreq/scmi-cpufreq.c
> @@ -174,7 +174,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
>  		nr_opp = dev_pm_opp_get_opp_count(cpu_dev);
>  		if (nr_opp <= 0) {
>  			dev_err(cpu_dev, "%s: No OPPs for this device: %d\n",
> -				__func__, ret);
> +				__func__, nr_opp);
>  
>  			ret = -ENODEV;
>  			goto out_free_opp;

Applied. Thanks.
diff mbox series

Patch

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index c8a4364ad3c2..ec9a87ca2dbb 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -174,7 +174,7 @@  static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 		nr_opp = dev_pm_opp_get_opp_count(cpu_dev);
 		if (nr_opp <= 0) {
 			dev_err(cpu_dev, "%s: No OPPs for this device: %d\n",
-				__func__, ret);
+				__func__, nr_opp);
 
 			ret = -ENODEV;
 			goto out_free_opp;