linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch_topology: Fix putting invalid cpu clk
@ 2020-03-17  0:18 Jeffy Chen
  2020-03-17  6:24 ` Sudeep Holla
  2020-03-17  6:35 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Jeffy Chen @ 2020-03-17  0:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: anders.roxell, arnd, sboyd, gregkh, naresh.kamboju,
	daniel.lezcano, Basil.Eljuse, mturquette, Jeffy Chen,
	Sudeep Holla, Rafael J. Wysocki

Add a sanity check before putting the cpu clk.

Fixes: 2a6d1c6bcd1f (“arch_topology: Adjust initial CPU capacities with current freq")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

 drivers/base/arch_topology.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 8a9fe2bc8635..4d0a0038b476 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -176,11 +176,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
 		 * frequency (by keeping the initial freq_factor value).
 		 */
 		cpu_clk = of_clk_get(cpu_node, 0);
-		if (!PTR_ERR_OR_ZERO(cpu_clk))
+		if (!PTR_ERR_OR_ZERO(cpu_clk)) {
 			per_cpu(freq_factor, cpu) =
 				clk_get_rate(cpu_clk) / 1000;
-
-		clk_put(cpu_clk);
+			clk_put(cpu_clk);
+		}
 	} else {
 		if (raw_capacity) {
 			pr_err("cpu_capacity: missing %pOF raw capacity\n",
-- 
2.11.0




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

* Re: [PATCH] arch_topology: Fix putting invalid cpu clk
  2020-03-17  0:18 [PATCH] arch_topology: Fix putting invalid cpu clk Jeffy Chen
@ 2020-03-17  6:24 ` Sudeep Holla
  2020-03-17  6:34   ` JeffyChen
  2020-03-17  6:35 ` Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Sudeep Holla @ 2020-03-17  6:24 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, anders.roxell, arnd, sboyd, gregkh, naresh.kamboju,
	daniel.lezcano, Basil.Eljuse, mturquette, Rafael J. Wysocki,
	Sudeep Holla

On Tue, Mar 17, 2020 at 08:18:29AM +0800, Jeffy Chen wrote:
> Add a sanity check before putting the cpu clk.
> 
> Fixes: 2a6d1c6bcd1f (“arch_topology: Adjust initial CPU capacities with current freq")

Fixing a non-existent commit ?

--
Regards,
Sudeep

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

* Re: [PATCH] arch_topology: Fix putting invalid cpu clk
  2020-03-17  6:24 ` Sudeep Holla
@ 2020-03-17  6:34   ` JeffyChen
  0 siblings, 0 replies; 4+ messages in thread
From: JeffyChen @ 2020-03-17  6:34 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-kernel, anders.roxell, arnd, sboyd, gregkh, naresh.kamboju,
	daniel.lezcano, Basil.Eljuse, mturquette, Rafael J. Wysocki

Hi Sudeep,

On 03/17/2020 02:24 PM, Sudeep Holla wrote:
> On Tue, Mar 17, 2020 at 08:18:29AM +0800, Jeffy Chen wrote:
>> Add a sanity check before putting the cpu clk.
>>
>> Fixes: 2a6d1c6bcd1f (“arch_topology: Adjust initial CPU capacities with current freq")
>
> Fixing a non-existent commit ?
>
Sorry, wrong commit id, will resend it soon.

> --
> Regards,
> Sudeep
>




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

* Re: [PATCH] arch_topology: Fix putting invalid cpu clk
  2020-03-17  0:18 [PATCH] arch_topology: Fix putting invalid cpu clk Jeffy Chen
  2020-03-17  6:24 ` Sudeep Holla
@ 2020-03-17  6:35 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-03-17  6:35 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, anders.roxell, arnd, sboyd, naresh.kamboju,
	daniel.lezcano, Basil.Eljuse, mturquette, Sudeep Holla,
	Rafael J. Wysocki

On Tue, Mar 17, 2020 at 08:18:29AM +0800, Jeffy Chen wrote:
> Add a sanity check before putting the cpu clk.
> 
> Fixes: 2a6d1c6bcd1f (“arch_topology: Adjust initial CPU capacities with current freq")

Don't you mean:
	Fixes: b8fe128dad8f ("arch_topology: Adjust initial CPU capacities with current freq")


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17  0:18 [PATCH] arch_topology: Fix putting invalid cpu clk Jeffy Chen
2020-03-17  6:24 ` Sudeep Holla
2020-03-17  6:34   ` JeffyChen
2020-03-17  6:35 ` Greg KH

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