Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86938
b: refs/heads/master
c: a07530b
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones committed Mar 5, 2008
1 parent 74e5534 commit dc6cbe2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0db4a8a99f6a8534c526e8c9d4b13d098400d485
refs/heads/master: a07530b44547a892dae59f4e0f141f4e6f5e2e40
9 changes: 5 additions & 4 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,22 +696,23 @@ static ssize_t store(struct kobject * kobj, struct attribute * attr,
{
struct cpufreq_policy * policy = to_policy(kobj);
struct freq_attr * fattr = to_attr(attr);
ssize_t ret;
ssize_t ret = -EINVAL;
policy = cpufreq_cpu_get(policy->cpu);
if (!policy)
return -EINVAL;
goto no_policy;

if (lock_policy_rwsem_write(policy->cpu) < 0)
return -EINVAL;
goto fail;

if (fattr->store)
ret = fattr->store(policy, buf, count);
else
ret = -EIO;

unlock_policy_rwsem_write(policy->cpu);

fail:
cpufreq_cpu_put(policy);
no_policy:
return ret;
}

Expand Down

0 comments on commit dc6cbe2

Please sign in to comment.