linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: intel_pstate: Fix missing return statement
@ 2020-09-28 14:36 Zhang Rui
  2020-09-30 15:39 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Rui @ 2020-09-28 14:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Linux PM list

From 1027ed2cacb0b50676eb52dd0089076d951033d7 Mon Sep 17 00:00:00 2001
From: Zhang Rui <rui.zhang@intel.com>
Date: Mon, 28 Sep 2020 11:33:42 +0800
Subject: [PATCH] cpufreq: intel_pstate: Fix missing return statement

Fix missing return statement when writing "off" to intel_pstate status
sysfs I/F.

Fixes: 55671ea3257a ("cpufreq: intel_pstate: Free memory only when turning off")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/cpufreq/intel_pstate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index a827b000ef51..9a515c460a00 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2781,6 +2781,7 @@ static int intel_pstate_update_status(const char *buf, size_t size)
 
 		cpufreq_unregister_driver(intel_pstate_driver);
 		intel_pstate_driver_cleanup();
+		return 0;
 	}
 
 	if (size == 6 && !strncmp(buf, "active", size)) {
-- 
2.17.1



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

* Re: [PATCH] cpufreq: intel_pstate: Fix missing return statement
  2020-09-28 14:36 [PATCH] cpufreq: intel_pstate: Fix missing return statement Zhang Rui
@ 2020-09-30 15:39 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-09-30 15:39 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Rafael J. Wysocki, Linux PM list

On Mon, Sep 28, 2020 at 4:36 PM Zhang Rui <rui.zhang@intel.com> wrote:
>
> From 1027ed2cacb0b50676eb52dd0089076d951033d7 Mon Sep 17 00:00:00 2001
> From: Zhang Rui <rui.zhang@intel.com>
> Date: Mon, 28 Sep 2020 11:33:42 +0800
> Subject: [PATCH] cpufreq: intel_pstate: Fix missing return statement
>
> Fix missing return statement when writing "off" to intel_pstate status
> sysfs I/F.
>
> Fixes: 55671ea3257a ("cpufreq: intel_pstate: Free memory only when turning off")
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/cpufreq/intel_pstate.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index a827b000ef51..9a515c460a00 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -2781,6 +2781,7 @@ static int intel_pstate_update_status(const char *buf, size_t size)
>
>                 cpufreq_unregister_driver(intel_pstate_driver);
>                 intel_pstate_driver_cleanup();
> +               return 0;
>         }
>
>         if (size == 6 && !strncmp(buf, "active", size)) {
> --

Applied as a 5.9-rc fix, thanks!

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

end of thread, other threads:[~2020-09-30 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 14:36 [PATCH] cpufreq: intel_pstate: Fix missing return statement Zhang Rui
2020-09-30 15:39 ` Rafael J. Wysocki

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).