aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 86f0a2430624..1d41496ed2f8 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -412,7 +412,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
412 int ret; 412 int ret;
413 413
414 mutex_unlock(&cpufreq_governor_mutex); 414 mutex_unlock(&cpufreq_governor_mutex);
415 ret = request_module(name); 415 ret = request_module("%s", name);
416 mutex_lock(&cpufreq_governor_mutex); 416 mutex_lock(&cpufreq_governor_mutex);
417 417
418 if (ret == 0) 418 if (ret == 0)
@@ -625,7 +625,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
625 unsigned int freq = 0; 625 unsigned int freq = 0;
626 unsigned int ret; 626 unsigned int ret;
627 627
628 if (!policy->governor->store_setspeed) 628 if (!policy->governor || !policy->governor->store_setspeed)
629 return -EINVAL; 629 return -EINVAL;
630 630
631 ret = sscanf(buf, "%u", &freq); 631 ret = sscanf(buf, "%u", &freq);
@@ -639,7 +639,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
639 639
640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) 640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf)
641{ 641{
642 if (!policy->governor->show_setspeed) 642 if (!policy->governor || !policy->governor->show_setspeed)
643 return sprintf(buf, "<unsupported>\n"); 643 return sprintf(buf, "<unsupported>\n");
644 644
645 return policy->governor->show_setspeed(policy, buf); 645 return policy->governor->show_setspeed(policy, buf);