Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169982
b: refs/heads/master
c: 5a94361
h: refs/heads/master
v: v3
  • Loading branch information
John Kacur authored and H. Peter Anvin committed Oct 8, 2009
1 parent 3efea8e commit d67ae51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 170a0bc3808909d8ea0f3f9c725c6565efe7f9c4
refs/heads/master: 5a943617ef52e9f79cd7cf437aad8870be27aabb
14 changes: 6 additions & 8 deletions trunk/arch/x86/kernel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,16 @@ static int cpuid_open(struct inode *inode, struct file *file)
{
unsigned int cpu;
struct cpuinfo_x86 *c;
int ret = 0;

cpu = iminor(file->f_path.dentry->d_inode);
if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
ret = -ENXIO; /* No such CPU */
goto out;
}
if (cpu >= nr_cpu_ids || !cpu_online(cpu))
return -ENXIO; /* No such CPU */

c = &cpu_data(cpu);
if (c->cpuid_level < 0)
ret = -EIO; /* CPUID not supported */
out:
return ret;
return -EIO; /* CPUID not supported */

return 0;
}

/*
Expand Down

0 comments on commit d67ae51

Please sign in to comment.