Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487503

Re: [PATCH] cpufreq: fix up conversion to hotplug state machine

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH] cpufreq: fix up conversion to hotplug state machine
Date 2016-09-20 18:20 +0200
Message-ID <sjvW2-5lT-43@gated-at.bofh.it> (permalink)
References <ses2L-4Ps-57@gated-at.bofh.it> <sjcTp-1ej-63@gated-at.bofh.it> <sjuGC-4nM-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday, September 20, 2016 04:56:28 PM Sebastian Andrzej Siewior wrote:
> The function cpufreq_register_driver() returns zero on success and since
> commit 27622b061eb4 ("cpufreq: Convert to hotplug state machine")
> erroneously a positive number. Due to the "if (x) assume_error" construct
> all callers assumed an error and things went south.
> This patch resets the return value back to zero in the success case.
> 
> Fixes: 27622b061eb4 ("cpufreq: Convert to hotplug state machine")
> Reported-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

ACK

> ---
>  drivers/cpufreq/cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index e0bc632a259e..8b44de4d7438 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2503,6 +2503,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
>  	if (ret < 0)
>  		goto err_if_unreg;
>  	hp_online = ret;
> +	ret = 0;
>  
>  	pr_debug("driver %s up and running\n", driver_data->name);
>  	goto out;
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[tip:smp/hotplug] cpufreq: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-09-19 22:00 +0200
  [PATCH] cpufreq: fix up conversion to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-20 17:00 +0200
    [tip:smp/hotplug] cpufreq: Fix up conversion to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-09-20 17:10 +0200
      Re: [tip:smp/hotplug] cpufreq: Fix up conversion to hotplug state  machine Borislav Petkov <bp@alien8.de> - 2016-09-20 18:10 +0200
    Re: [PATCH] cpufreq: fix up conversion to hotplug state machine "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-20 18:20 +0200

csiph-web