[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1570927586-12023-1-git-send-email-zhenzhong.duan@oracle.com>
Date: Sun, 13 Oct 2019 08:46:26 +0800
From: Zhenzhong Duan <zhenzhong.duan@...cle.com>
To: linux-kernel@...r.kernel.org
Cc: rjw@...ysocki.net, daniel.lezcano@...aro.org,
linux-pm@...r.kernel.org, mtosatti@...hat.com,
Zhenzhong Duan <zhenzhong.duan@...cle.com>
Subject: [PATCH] cpuidle: not unset the driver if it already exist
__cpuidle_set_driver() check if there is an already exist driver and
unset it before return with -EBUSY. The next call will succeed as it's
just unset. This is strange as we should either keep old driver and
return -EBUSY or unset and set new driver and return 0.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...cle.com>
---
drivers/cpuidle/driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 80c1a83..a200304 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -74,7 +74,6 @@ static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
for_each_cpu(cpu, drv->cpumask) {
if (__cpuidle_get_cpu_driver(cpu)) {
- __cpuidle_unset_driver(drv);
return -EBUSY;
}
--
1.8.3.1
Powered by blists - more mailing lists