From 0a9347f6fb39c1e52b491a3fc83817fe2e141ade Mon Sep 17 00:00:00 2001 From: CHIKAMA masaki Date: Thu, 5 Jun 2008 22:46:33 -0700 Subject: [PATCH] --- yaml --- r: 97811 b: refs/heads/master c: 879000f94442860e72c934f9e568989bc7fb8ec4 h: refs/heads/master i: 97809: 973508fb0786b20df81bf902ef78af92867d3771 97807: 74aaf57b5c2b979a68207f71fa8eb2885a89f44d v: v3 --- [refs] | 2 +- trunk/drivers/cpufreq/cpufreq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f9ddbea1cab8..07f3f82d1746 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 10732c35dff6c2e15e413e7806a7114a2faa0ecf +refs/heads/master: 879000f94442860e72c934f9e568989bc7fb8ec4 diff --git a/trunk/drivers/cpufreq/cpufreq.c b/trunk/drivers/cpufreq/cpufreq.c index 86f0a2430624..4e07d1f43a43 100644 --- a/trunk/drivers/cpufreq/cpufreq.c +++ b/trunk/drivers/cpufreq/cpufreq.c @@ -625,7 +625,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy, unsigned int freq = 0; unsigned int ret; - if (!policy->governor->store_setspeed) + if (!policy->governor || !policy->governor->store_setspeed) return -EINVAL; ret = sscanf(buf, "%u", &freq); @@ -639,7 +639,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy, static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) { - if (!policy->governor->show_setspeed) + if (!policy->governor || !policy->governor->show_setspeed) return sprintf(buf, "\n"); return policy->governor->show_setspeed(policy, buf);