diff mbox series

cpufreq: fix typo when cpufreq device remove

Message ID 20220506170832.33386-1-schspa@gmail.com
State New
Headers show
Series cpufreq: fix typo when cpufreq device remove | expand

Commit Message

Schspa Shi May 6, 2022, 5:08 p.m. UTC
This should check cpufreq_driver->exit pointer before call this function

Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of
CPUs")

Signed-off-by: Schspa Shi <schspa@gmail.com>
---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar May 9, 2022, 3:36 a.m. UTC | #1
On 07-05-22, 01:08, Schspa Shi wrote:
> This should check cpufreq_driver->exit pointer before call this function
> 
> Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of
> CPUs")
> 
> Signed-off-by: Schspa Shi <schspa@gmail.com>
> ---
>  drivers/cpufreq/cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 43dfaa8124e2..0f59c8ec2b39 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1661,7 +1661,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
>  
>  	if (cpumask_empty(policy->real_cpus)) {
>  		/* We did light-weight exit earlier, do full tear down now */
> -		if (cpufreq_driver->offline)
> +		if (cpufreq_driver->exit)
>  			cpufreq_driver->exit(policy);
>  
>  		cpufreq_policy_free(policy);

NAK.

The code is doing fine and there is a comment above it on why it is
doing it this way.
diff mbox series

Patch

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 43dfaa8124e2..0f59c8ec2b39 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1661,7 +1661,7 @@  static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
 
 	if (cpumask_empty(policy->real_cpus)) {
 		/* We did light-weight exit earlier, do full tear down now */
-		if (cpufreq_driver->offline)
+		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(policy);
 
 		cpufreq_policy_free(policy);