diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1e08af43ae72..0a5bea9e3585 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -321,21 +321,14 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy, | |||
321 | t = __find_governor(str_governor); | 321 | t = __find_governor(str_governor); |
322 | 322 | ||
323 | if (t == NULL) { | 323 | if (t == NULL) { |
324 | char *name = kasprintf(GFP_KERNEL, "cpufreq_%s", | 324 | int ret; |
325 | str_governor); | ||
326 | 325 | ||
327 | if (name) { | 326 | mutex_unlock(&cpufreq_governor_mutex); |
328 | int ret; | 327 | ret = request_module("cpufreq_%s", str_governor); |
328 | mutex_lock(&cpufreq_governor_mutex); | ||
329 | 329 | ||
330 | mutex_unlock(&cpufreq_governor_mutex); | 330 | if (ret == 0) |
331 | ret = request_module("%s", name); | 331 | t = __find_governor(str_governor); |
332 | mutex_lock(&cpufreq_governor_mutex); | ||
333 | |||
334 | if (ret == 0) | ||
335 | t = __find_governor(str_governor); | ||
336 | } | ||
337 | |||
338 | kfree(name); | ||
339 | } | 332 | } |
340 | 333 | ||
341 | if (t != NULL) { | 334 | if (t != NULL) { |